Created
August 1, 2015 05:09
-
-
Save roadev/7b34fd67ab93c979fa48 to your computer and use it in GitHub Desktop.
My view doesn't show the corrent amount of earned points - merit gem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Started POST "/solucions" for 127.0.0.1 at 2015-08-01 00:05:47 -0500 | |
ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" | |
Processing by SolucionsController#create as HTML | |
Parameters: {"utf8"=>"✓", "authenticity_token"=>"S2gf6bbCbA33KY2NNTk3F3lnBcwOFUuk0jJHgKLY3D0=", "solucion"=>{"micropost_id"=>"1", "solucion"=>"This is the content"}, "commit"=>"Crear Solución"} | |
User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1 | |
/home/jroa/.rvm/gems/ruby-2.2.1/gems/activerecord-4.0.4/lib/active_record/associations/has_many_association.rb:76: warning: circular argument reference - reflection | |
/home/jroa/.rvm/gems/ruby-2.2.1/gems/activerecord-4.0.4/lib/active_record/associations/has_many_association.rb:80: warning: circular argument reference - reflection | |
/home/jroa/.rvm/gems/ruby-2.2.1/gems/activerecord-4.0.4/lib/active_record/associations/has_many_association.rb:84: warning: circular argument reference - reflection | |
/home/jroa/.rvm/gems/ruby-2.2.1/gems/activerecord-4.0.4/lib/active_record/associations/has_many_association.rb:103: warning: circular argument reference - reflection | |
(0.1ms) begin transaction | |
SQL (3.2ms) INSERT INTO "solucions" ("created_at", "micropost_id", "solucion", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["created_at", Sat, 01 Aug 2015 05:05:47 UTC +00:00], ["micropost_id", 1], ["solucion", "This is the content"], ["updated_at", Sat, 01 Aug 2015 05:05:47 UTC +00:00], ["user_id", 1]] | |
(122.2ms) commit transaction | |
Redirected to http://localhost:3000/solucions/2 | |
(0.1ms) begin transaction | |
SQL (0.2ms) INSERT INTO "merit_actions" ("action_method", "created_at", "target_data", "target_id", "target_model", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?, ?, ?) [["action_method", "create"], ["created_at", Sat, 01 Aug 2015 05:05:47 UTC +00:00], ["target_data", "--- !ruby/object:Solucion\nattributes:\n id: 2\n micropost_id: 1\n solucion: This is the content\n created_at: &1 2015-08-01 05:05:47.455839104 Z\n updated_at: *1\n image_file_name: \n image_content_type: \n image_file_size: \n image_updated_at: \n user_id: 1\n"], ["target_id", 2], ["target_model", "solucions"], ["updated_at", Sat, 01 Aug 2015 05:05:47 UTC +00:00], ["user_id", 1]] | |
(90.1ms) commit transaction | |
Merit::Action Load (0.1ms) SELECT "merit_actions".* FROM "merit_actions" WHERE "merit_actions"."processed" = 'f' | |
(0.0ms) begin transaction | |
SQL (0.2ms) UPDATE "merit_actions" SET "processed" = ?, "updated_at" = ? WHERE "merit_actions"."id" = 2 [["processed", true], ["updated_at", Sat, 01 Aug 2015 05:05:47 UTC +00:00]] | |
(96.7ms) commit transaction | |
Solucion Load (0.1ms) SELECT "solucions".* FROM "solucions" WHERE "solucions"."id" = 2 LIMIT 1 | |
User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1 | |
User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] | |
(0.0ms) begin transaction | |
SQL (0.2ms) INSERT INTO "sashes" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Sat, 01 Aug 2015 05:05:47 UTC +00:00], ["updated_at", Sat, 01 Aug 2015 05:05:47 UTC +00:00]] | |
SQL (0.1ms) INSERT INTO "merit_scores" DEFAULT VALUES | |
SQL (0.1ms) UPDATE "merit_scores" SET "sash_id" = ? WHERE "merit_scores"."id" = 5 [["sash_id", 5]] | |
(91.8ms) commit transaction | |
(0.1ms) begin transaction | |
(0.1ms) rollback transaction | |
Merit::Score Load (0.1ms) SELECT "merit_scores".* FROM "merit_scores" WHERE "merit_scores"."sash_id" = ? AND "merit_scores"."category" = 'default' ORDER BY "merit_scores"."id" ASC LIMIT 1 [["sash_id", 5]] | |
(0.0ms) begin transaction | |
SQL (0.2ms) INSERT INTO "merit_score_points" ("created_at", "num_points", "score_id") VALUES (?, ?, ?) [["created_at", Sat, 01 Aug 2015 05:05:47 UTC +00:00], ["num_points", 5], ["score_id", 5]] | |
(93.6ms) commit transaction | |
Merit::Score Load (0.1ms) SELECT "merit_scores".* FROM "merit_scores" WHERE "merit_scores"."id" = ? LIMIT 1 [["id", 5]] | |
(0.1ms) begin transaction | |
SQL (0.2ms) INSERT INTO "merit_activity_logs" ("action_id", "created_at", "description", "related_change_id", "related_change_type") VALUES (?, ?, ?, ?, ?) [["action_id", 2], ["created_at", Sat, 01 Aug 2015 05:05:48 UTC +00:00], ["description", "granted 5 points"], ["related_change_id", 2], ["related_change_type", "Merit::Score::Point"]] | |
(98.5ms) commit transaction | |
Completed 302 Found in 721ms (ActiveRecord: 601.1ms) | |
Started GET "/solucions/2" for 127.0.0.1 at 2015-08-01 00:05:48 -0500 | |
Processing by SolucionsController#show as HTML | |
Parameters: {"id"=>"2"} | |
Solucion Load (0.1ms) SELECT "solucions".* FROM "solucions" WHERE "solucions"."id" = ? LIMIT 1 [["id", "2"]] | |
User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1 | |
User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] | |
(0.0ms) begin transaction | |
SQL (0.2ms) INSERT INTO "sashes" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Sat, 01 Aug 2015 05:05:48 UTC +00:00], ["updated_at", Sat, 01 Aug 2015 05:05:48 UTC +00:00]] | |
SQL (0.1ms) INSERT INTO "merit_scores" DEFAULT VALUES | |
SQL (0.1ms) UPDATE "merit_scores" SET "sash_id" = ? WHERE "merit_scores"."id" = 6 [["sash_id", 6]] | |
(99.9ms) commit transaction | |
(0.1ms) begin transaction | |
(0.1ms) rollback transaction | |
Merit::Score Load (0.1ms) SELECT "merit_scores".* FROM "merit_scores" WHERE "merit_scores"."sash_id" = ? [["sash_id", 6]] | |
(0.1ms) SELECT SUM("merit_score_points"."num_points") AS sum_num_points, score_id AS score_id FROM "merit_score_points" WHERE "merit_score_points"."score_id" = ? GROUP BY score_id [["score_id", 6]] | |
Rendered layouts/_solucion.html.erb (112.8ms) | |
Rendered solucions/show.html.erb within layouts/application (114.9ms) | |
Rendered layouts/_header.html.erb (3.9ms) | |
Completed 200 OK in 125ms (Views: 22.7ms | ActiveRecord: 101.0ms) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment