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