Je vais essayé
Processing by API::MembersController#search as JSON
Parameters: {"query"=>"ca"}
User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
Role Load (0.3ms) SELECT "roles".* FROM "roles" INNER JOIN "users_roles" ON "roles"."id" = "users_roles"."role_id" WHERE "users_roles"."user_id" = $1 AND (((roles.name = 'member') AND (roles.resource_type IS NULL) AND (roles.resource_id IS NULL))) [["user_id", 1]]
SQL (2.8ms) SELECT "users"."id" AS t0_r0, "users"."email" AS t0_r1, "users"."encrypted_password" AS t0_r2, "users"."reset_password_token" AS t0_r3, "users"."reset_password_sent_at" AS t0_r4, "users"."remember_created_at" AS t0_r5, "users"."sign_in_count" AS t0_r6, "users"."current_sign_in_at" AS t0_r7, "users"."last_sign_in_at" AS t0_r8, "users"."current_sign_in_ip" AS t0_r9, "users"."last_sign_in_ip" AS t0_r10, "users"."confirmation_token" AS t0_r11, "users"."confirmed_at" AS t0_r12, "users"."confirmation_sent_at" AS t0_r13, "users"."unconfirmed_email" AS t0_r14, "users"."failed_attempts" AS t0_r15, "users"."unlock_token" AS t0_r16, "users"."locked_at" AS t0_r17, "users"."created_at" AS t0_r18, "users"."updated_at" AS t0_r19, "users"."is_allow_contact" AS t0_r20, "users"."group_id" AS t0_r21, "users"."stp_customer_id" AS t0_r22, "users"."username" AS t0_r23, "users"."slug" AS t0_r24, "users"."is_active" AS t0_r25, "users"."provider" AS t0_r26, "users"."uid" AS t0_r27, "users"."auth_token" AS t0_r28, "users"."merged_at" AS t0_r29, "users"."is_allow_newsletter" AS t0_r30, "profiles"."id" AS t1_r0, "profiles"."user_id" AS t1_r1, "profiles"."first_name" AS t1_r2, "profiles"."last_name" AS t1_r3, "profiles"."phone" AS t1_r4, "profiles"."interest" AS t1_r5, "profiles"."software_mastered" AS t1_r6, "profiles"."created_at" AS t1_r7, "profiles"."updated_at" AS t1_r8, "profiles"."facebook" AS t1_r9, "profiles"."twitter" AS t1_r10, "profiles"."google_plus" AS t1_r11, "profiles"."viadeo" AS t1_r12, "profiles"."linkedin" AS t1_r13, "profiles"."instagram" AS t1_r14, "profiles"."youtube" AS t1_r15, "profiles"."vimeo" AS t1_r16, "profiles"."dailymotion" AS t1_r17, "profiles"."github" AS t1_r18, "profiles"."echosciences" AS t1_r19, "profiles"."website" AS t1_r20, "profiles"."pinterest" AS t1_r21, "profiles"."lastfm" AS t1_r22, "profiles"."flickr" AS t1_r23, "profiles"."job" AS t1_r24, "profiles"."tours" AS t1_r25 FROM "users" INNER JOIN "profiles" ON "profiles"."user_id" = "users"."id" INNER JOIN "statistic_profiles" ON "statistic_profiles"."user_id" = "users"."id" INNER JOIN "users_roles" ON "users_roles"."user_id" = "users"."id" INNER JOIN "roles" ON "roles"."id" = "users_roles"."role_id" LEFT JOIN "subscriptions" ON "subscriptions"."statistic_profile_id" = "statistic_profiles"."id" AND "subscriptions"."created_at" = ( SELECT max("created_at") FROM "subscriptions" WHERE "statistic_profile_id" = "statistic_profiles"."id") WHERE (users.is_active = 'true' AND roles.name = 'member') AND (lower(f_unaccent(profiles.first_name)) ~ 'ca' OR lower(f_unaccent(profiles.last_name)) ~ 'ca') LIMIT 50
StatisticProfile Load (0.2ms) SELECT "statistic_profiles".* FROM "statistic_profiles" WHERE "statistic_profiles"."user_id" = $1 LIMIT 1 [["user_id", 2]]
Rendered api/members/search.json.jbuilder (1.3ms)
Completed 200 OK in 11ms (Views: 1.7ms | ActiveRecord: 3.5ms | Elasticsearch: 0.0ms)
Started GET "/api/members/search/cat" for 78.208.95.64 at 2020-03-11 14:03:21 +0000
Processing by API::MembersController#search as JSON
Parameters: {"query"=>"cat"}
User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
Role Load (0.3ms) SELECT "roles".* FROM "roles" INNER JOIN "users_roles" ON "roles"."id" = "users_roles"."role_id" WHERE "users_roles"."user_id" = $1 AND (((roles.name = 'member') AND (roles.resource_type IS NULL) AND (roles.resource_id IS NULL))) [["user_id", 1]]
SQL (3.8ms) SELECT "users"."id" AS t0_r0, "users"."email" AS t0_r1, "users"."encrypted_password" AS t0_r2, "users"."reset_password_token" AS t0_r3, "users"."reset_password_sent_at" AS t0_r4, "users"."remember_created_at" AS t0_r5, "users"."sign_in_count" AS t0_r6, "users"."current_sign_in_at" AS t0_r7, "users"."last_sign_in_at" AS t0_r8, "users"."current_sign_in_ip" AS t0_r9, "users"."last_sign_in_ip" AS t0_r10, "users"."confirmation_token" AS t0_r11, "users"."confirmed_at" AS t0_r12, "users"."confirmation_sent_at" AS t0_r13, "users"."unconfirmed_email" AS t0_r14, "users"."failed_attempts" AS t0_r15, "users"."unlock_token" AS t0_r16, "users"."locked_at" AS t0_r17, "users"."created_at" AS t0_r18, "users"."updated_at" AS t0_r19, "users"."is_allow_contact" AS t0_r20, "users"."group_id" AS t0_r21, "users"."stp_customer_id" AS t0_r22, "users"."username" AS t0_r23, "users"."slug" AS t0_r24, "users"."is_active" AS t0_r25, "users"."provider" AS t0_r26, "users"."uid" AS t0_r27, "users"."auth_token" AS t0_r28, "users"."merged_at" AS t0_r29, "users"."is_allow_newsletter" AS t0_r30, "profiles"."id" AS t1_r0, "profiles"."user_id" AS t1_r1, "profiles"."first_name" AS t1_r2, "profiles"."last_name" AS t1_r3, "profiles"."phone" AS t1_r4, "profiles"."interest" AS t1_r5, "profiles"."software_mastered" AS t1_r6, "profiles"."created_at" AS t1_r7, "profiles"."updated_at" AS t1_r8, "profiles"."facebook" AS t1_r9, "profiles"."twitter" AS t1_r10, "profiles"."google_plus" AS t1_r11, "profiles"."viadeo" AS t1_r12, "profiles"."linkedin" AS t1_r13, "profiles"."instagram" AS t1_r14, "profiles"."youtube" AS t1_r15, "profiles"."vimeo" AS t1_r16, "profiles"."dailymotion" AS t1_r17, "profiles"."github" AS t1_r18, "profiles"."echosciences" AS t1_r19, "profiles"."website" AS t1_r20, "profiles"."pinterest" AS t1_r21, "profiles"."lastfm" AS t1_r22, "profiles"."flickr" AS t1_r23, "profiles"."job" AS t1_r24, "profiles"."tours" AS t1_r25 FROM "users" INNER JOIN "profiles" ON "profiles"."user_id" = "users"."id" INNER JOIN "statistic_profiles" ON "statistic_profiles"."user_id" = "users"."id" INNER JOIN "users_roles" ON "users_roles"."user_id" = "users"."id" INNER JOIN "roles" ON "roles"."id" = "users_roles"."role_id" LEFT JOIN "subscriptions" ON "subscriptions"."statistic_profile_id" = "statistic_profiles"."id" AND "subscriptions"."created_at" = ( SELECT max("created_at") FROM "subscriptions" WHERE "statistic_profile_id" = "statistic_profiles"."id") WHERE (users.is_active = 'true' AND roles.name = 'member') AND (lower(f_unaccent(profiles.first_name)) ~ 'cat' OR lower(f_unaccent(profiles.last_name)) ~ 'cat') LIMIT 50
StatisticProfile Load (0.2ms) SELECT "statistic_profiles".* FROM "statistic_profiles" WHERE "statistic_profiles"."user_id" = $1 LIMIT 1 [["user_id", 2]]
Rendered api/members/search.json.jbuilder (1.3ms)
Completed 200 OK in 12ms (Views: 1.7ms | ActiveRecord: 4.5ms | Elasticsearch: 0.0ms)
Started POST "/api/prices/compute" for 78.208.95.64 at 2020-03-11 14:03:24 +0000
Value for params[:reservation][:slots_attributes] was set to nil, because it was one of [], [null] or [null, null, ...]. Go to http://guides.rubyonrails.org/security.html#unsafe-query-generation for more information.
Processing by API::PricesController#compute as JSON
Parameters: {"reservation"=>{"user_id"=>2, "reservable_id"=>"11", "reservable_type"=>"Machine", "slots_attributes"=>nil}, "price"=>{}}
User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 2]]
Machine Load (0.1ms) SELECT "machines".* FROM "machines" WHERE "machines"."id" = $1 LIMIT 1 [["id", 11]]
Role Load (0.1ms) SELECT "roles".* FROM "roles" INNER JOIN "users_roles" ON "roles"."id" = "users_roles"."role_id" WHERE "users_roles"."user_id" = $1 AND (((roles.name = 'admin') AND (roles.resource_type IS NULL) AND (roles.resource_id IS NULL))) [["user_id", 1]]
StatisticProfile Load (0.1ms) SELECT "statistic_profiles".* FROM "statistic_profiles" WHERE "statistic_profiles"."user_id" = $1 LIMIT 1 [["user_id", 2]]
Subscription Load (0.1ms) SELECT "subscriptions".* FROM "subscriptions" WHERE "subscriptions"."statistic_profile_id" = $1 ORDER BY "subscriptions"."created_at" DESC LIMIT 1 [["statistic_profile_id", 2]]
Price Load (0.2ms) SELECT "prices".* FROM "prices" WHERE "prices"."priceable_id" = $1 AND "prices"."priceable_type" = $2 AND "prices"."group_id" = $3 AND "prices"."plan_id" IS NULL LIMIT 1 [["priceable_id", 11], ["priceable_type", "Machine"], ["group_id", 1]]
Rendered api/prices/compute.json.jbuilder (0.1ms)
Completed 200 OK in 6ms (Views: 0.5ms | ActiveRecord: 1.0ms | Elasticsearch: 0.0ms)
Started GET "/api/members/2" for 78.208.95.64 at 2020-03-11 14:03:24 +0000
Processing by API::MembersController#show as JSON
Parameters: {"id"=>"2"}
User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
User Load (1.3ms) SELECT "users".* FROM "users" WHERE "users"."slug" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["slug", "2"]]
User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 2]]
Role Load (0.2ms) SELECT "roles".* FROM "roles" INNER JOIN "users_roles" ON "roles"."id" = "users_roles"."role_id" WHERE "users_roles"."user_id" = $1 AND (((roles.name = 'admin') AND (roles.resource_type IS NULL) AND (roles.resource_id IS NULL))) [["user_id", 1]]
Role Load (0.2ms) SELECT "roles".* FROM "roles" INNER JOIN "users_roles" ON "roles"."id" = "users_roles"."role_id" WHERE "users_roles"."user_id" = $1 ORDER BY "roles"."id" ASC LIMIT 1 [["user_id", 2]]
Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."user_id" = $1 LIMIT 1 [["user_id", 2]]
StatisticProfile Load (0.1ms) SELECT "statistic_profiles".* FROM "statistic_profiles" WHERE "statistic_profiles"."user_id" = $1 LIMIT 1 [["user_id", 2]]
UserAvatar Load (0.1ms) SELECT "assets".* FROM "assets" WHERE "assets"."type" IN ('UserAvatar') AND "assets"."viewable_id" = $1 AND "assets"."viewable_type" = $2 LIMIT 1 [["viewable_id", 2], ["viewable_type", "Profile"]]
InvoicingProfile Load (0.1ms) SELECT "invoicing_profiles".* FROM "invoicing_profiles" WHERE "invoicing_profiles"."user_id" = $1 LIMIT 1 [["user_id", 2]]
Address Load (0.1ms) SELECT "addresses".* FROM "addresses" WHERE "addresses"."placeable_id" = $1 AND "addresses"."placeable_type" = $2 LIMIT 1 [["placeable_id", 2], ["placeable_type", "InvoicingProfile"]]
Organization Load (0.1ms) SELECT "organizations".* FROM "organizations" WHERE "organizations"."invoicing_profile_id" = $1 LIMIT 1 [["invoicing_profile_id", 2]]
Subscription Load (0.1ms) SELECT "subscriptions".* FROM "subscriptions" WHERE "subscriptions"."statistic_profile_id" = $1 ORDER BY "subscriptions"."created_at" DESC LIMIT 1 [["statistic_profile_id", 2]]
CACHE (0.0ms) SELECT "subscriptions".* FROM "subscriptions" WHERE "subscriptions"."statistic_profile_id" = $1 ORDER BY "subscriptions"."created_at" DESC LIMIT 1 [["statistic_profile_id", 2]]
Credit Load (0.1ms) SELECT "credits".* FROM "credits" INNER JOIN "users_credits" ON "credits"."id" = "users_credits"."credit_id" WHERE "users_credits"."user_id" = $1 AND (credits.creditable_type = 'Training') [["user_id", 2]]
Credit Load (0.1ms) SELECT "credits".* FROM "credits" INNER JOIN "users_credits" ON "credits"."id" = "users_credits"."credit_id" WHERE "users_credits"."user_id" = $1 AND (credits.creditable_type = 'Machine') [["user_id", 2]]
Rendered api/members/_member.json.jbuilder (11.0ms)
(0.3ms) SELECT "trainings".id FROM "trainings" INNER JOIN "statistic_profile_trainings" ON "trainings"."id" = "statistic_profile_trainings"."training_id" WHERE "statistic_profile_trainings"."statistic_profile_id" = $1 [["statistic_profile_id", 2]]
Training Load (0.2ms) SELECT "trainings".* FROM "trainings" INNER JOIN "statistic_profile_trainings" ON "trainings"."id" = "statistic_profile_trainings"."training_id" WHERE "statistic_profile_trainings"."statistic_profile_id" = $1 [["statistic_profile_id", 2]]
Reservation Load (0.2ms) SELECT "reservations".* FROM "reservations" WHERE "reservations"."statistic_profile_id" = $1 AND "reservations"."reservable_type" = $2 [["statistic_profile_id", 2], ["reservable_type", "Training"]]
Reservation Load (0.1ms) SELECT "reservations".* FROM "reservations" WHERE "reservations"."statistic_profile_id" = $1 AND "reservations"."reservable_type" = $2 [["statistic_profile_id", 2], ["reservable_type", "Machine"]]
Reservation Load (0.2ms) SELECT "reservations".* FROM "reservations" WHERE "reservations"."statistic_profile_id" = $1 AND "reservations"."reservable_type" = $2 [["statistic_profile_id", 2], ["reservable_type", "Space"]]
Project Load (0.1ms) SELECT "projects".* FROM "projects" WHERE "projects"."author_statistic_profile_id" = $1 [["author_statistic_profile_id", 2]]
Project Load (0.2ms) SELECT "projects".* FROM "projects" INNER JOIN "project_users" ON "projects"."id" = "project_users"."project_id" WHERE "project_users"."user_id" = $1 [["user_id", 2]]
Reservation Load (0.4ms) SELECT "reservations".* FROM "reservations" INNER JOIN "slots_reservations" ON "slots_reservations"."reservation_id" = "reservations"."id" INNER JOIN "slots" ON "slots"."id" = "slots_reservations"."slot_id" WHERE "reservations"."statistic_profile_id" = $1 AND "reservations"."reservable_type" = $2 ORDER BY slots.start_at asc [["statistic_profile_id", 2], ["reservable_type", "Event"]]
Invoice Load (0.2ms) SELECT "invoices".* FROM "invoices" WHERE "invoices"."invoicing_profile_id" = $1 ORDER BY reference DESC [["invoicing_profile_id", 2]]
(0.2ms) SELECT "tags".id FROM "tags" INNER JOIN "user_tags" ON "tags"."id" = "user_tags"."tag_id" WHERE "user_tags"."user_id" = $1 [["user_id", 2]]
Tag Load (0.3ms) SELECT "tags".* FROM "tags" INNER JOIN "user_tags" ON "tags"."id" = "user_tags"."tag_id" WHERE "user_tags"."user_id" = $1 [["user_id", 2]]
Rendered api/members/show.json.jbuilder (22.3ms)
Completed 200 OK in 30ms (Views: 19.1ms | ActiveRecord: 5.5ms | Elasticsearch: 0.0ms)
Started POST "/api/prices/compute" for 78.208.95.64 at 2020-03-11 14:03:24 +0000
Value for params[:reservation][:slots_attributes] was set to nil, because it was one of [], [null] or [null, null, ...]. Go to http://guides.rubyonrails.org/security.html#unsafe-query-generation for more information.
Processing by API::PricesController#compute as JSON
Parameters: {"reservation"=>{"user_id"=>2, "reservable_id"=>"11", "reservable_type"=>"Machine", "slots_attributes"=>nil}, "price"=>{}}
User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 2]]
Machine Load (0.1ms) SELECT "machines".* FROM "machines" WHERE "machines"."id" = $1 LIMIT 1 [["id", 11]]
Role Load (0.2ms) SELECT "roles".* FROM "roles" INNER JOIN "users_roles" ON "roles"."id" = "users_roles"."role_id" WHERE "users_roles"."user_id" = $1 AND (((roles.name = 'admin') AND (roles.resource_type IS NULL) AND (roles.resource_id IS NULL))) [["user_id", 1]]
StatisticProfile Load (0.1ms) SELECT "statistic_profiles".* FROM "statistic_profiles" WHERE "statistic_profiles"."user_id" = $1 LIMIT 1 [["user_id", 2]]
Subscription Load (0.1ms) SELECT "subscriptions".* FROM "subscriptions" WHERE "subscriptions"."statistic_profile_id" = $1 ORDER BY "subscriptions"."created_at" DESC LIMIT 1 [["statistic_profile_id", 2]]
Price Load (0.2ms) SELECT "prices".* FROM "prices" WHERE "prices"."priceable_id" = $1 AND "prices"."priceable_type" = $2 AND "prices"."group_id" = $3 AND "prices"."plan_id" IS NULL LIMIT 1 [["priceable_id", 11], ["priceable_type", "Machine"], ["group_id", 1]]
Rendered api/prices/compute.json.jbuilder (0.1ms)