acts_rateable 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/acts_rateable/acts_rateable.rb +6 -17
- data/lib/acts_rateable/rate.rb +1 -1
- data/lib/acts_rateable/rating.rb +12 -9
- data/lib/acts_rateable/version.rb +1 -1
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/test.log +0 -713
- metadata +2 -2
@@ -10,20 +10,14 @@ module ActsRateable
|
|
10
10
|
|
11
11
|
has_many :rates, class_name: ActsRateable::Rate, as: :resource, dependent: :destroy
|
12
12
|
has_many :rated, class_name: ActsRateable::Rate, as: :author, dependent: :destroy
|
13
|
-
has_one :
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
# => direction: DESC, ASC
|
18
|
-
|
19
|
-
scope :order_by, lambda { | column='estimate', direction="DESC" |
|
20
|
-
joins("LEFT OUTER JOIN ar_ratings ON ar_ratings.resource_id = #{self.table_name}.id AND ar_ratings.resource_type = '#{self.name}'").
|
21
|
-
select("#{self.table_name}.*, COALESCE(ar_ratings.total, 0) as total, COALESCE(ar_ratings.average, 0) as average, COALESCE(ar_ratings.sum, 0) as sum, COALESCE(ar_ratings.estimate, 0) as estimate").
|
22
|
-
order("#{column.downcase} #{direction.upcase}")
|
13
|
+
has_one :rating, class_name: ActsRateable::Rating, as: :resource, dependent: :destroy
|
14
|
+
|
15
|
+
scope :order_by_rating, lambda { | column='estimate', direction="DESC" |
|
16
|
+
includes(:rating).group('ar_ratings.id').order("ar_ratings.#{column.downcase} #{direction.upcase}")
|
23
17
|
}
|
24
18
|
|
25
19
|
after_save do
|
26
|
-
ActsRateable::Rating.
|
20
|
+
ActsRateable::Rating.where({resource_id: self.id, resource_type: self.class.name}).first_or_create #if !rates.empty?
|
27
21
|
end
|
28
22
|
|
29
23
|
include LocalInstanceMethods
|
@@ -33,14 +27,9 @@ module ActsRateable
|
|
33
27
|
|
34
28
|
module LocalInstanceMethods
|
35
29
|
|
36
|
-
# Returns the resource rating
|
37
|
-
# column: total, sum, average and estimate
|
38
|
-
def rating(column='estimate')
|
39
|
-
ratings.nil? ? nil : ratings[column]
|
40
|
-
end
|
41
30
|
|
42
31
|
def variation( author )
|
43
|
-
rated_by?(author) ? (rated_by?(author).value/self.rating) : nil
|
32
|
+
rated_by?(author) ? (rated_by?(author).value/self.rating['estimate']) : nil
|
44
33
|
end
|
45
34
|
|
46
35
|
# Checks wheter a resource has been rated by a user. Returns the rating if true, otherwise returns false.
|
data/lib/acts_rateable/rate.rb
CHANGED
data/lib/acts_rateable/rating.rb
CHANGED
@@ -13,6 +13,8 @@ module ActsRateable
|
|
13
13
|
|
14
14
|
@@global_ratings = {}
|
15
15
|
|
16
|
+
before_save :update_ratings
|
17
|
+
|
16
18
|
def self.set_totals(resource)
|
17
19
|
sql = "SELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, "+
|
18
20
|
"(SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = '#{resource.class.name}') rated_count, "+
|
@@ -40,15 +42,16 @@ module ActsRateable
|
|
40
42
|
return { 'global' => global, 'local' => local.merge!({ 'estimate' => estimate }) }
|
41
43
|
end
|
42
44
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
45
|
+
protected
|
46
|
+
|
47
|
+
def update_ratings
|
48
|
+
if !resource.rates.empty?
|
49
|
+
result = self.class.data_for(resource)
|
50
|
+
self.total = result['local']['total_ratings']
|
51
|
+
self.average = result['local']['rating_avg']
|
52
|
+
self.sum = result['local']['rating_sum']
|
53
|
+
self.estimate = result['local']['estimate']
|
54
|
+
self.class.set_totals(resource) # Reset global values
|
52
55
|
end
|
53
56
|
end
|
54
57
|
end
|
data/test/dummy/db/test.sqlite3
CHANGED
Binary file
|
data/test/dummy/log/test.log
CHANGED
@@ -3637,716 +3637,3 @@ Connecting to database specified by database.yml
|
|
3637
3637
|
[1m[35m (0.4ms)[0m SELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post') rated_count, ((SELECT COUNT(*) from ar_rates WHERE resource_type = 'Post') / (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post')) avg_num_ratings FROM ar_rates WHERE resource_type = 'Post'
|
3638
3638
|
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
3639
3639
|
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "ar_rates" WHERE "ar_rates"."resource_id" = 105 AND "ar_rates"."resource_type" = 'Post'
|
3640
|
-
Connecting to database specified by database.yml
|
3641
|
-
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
3642
|
-
[1m[35mSQL (10.0ms)[0m INSERT INTO "users" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?) [["created_at", Thu, 23 May 2013 20:08:09 UTC +00:00], ["name", "Reyna"], ["updated_at", Thu, 23 May 2013 20:08:09 UTC +00:00], ["value", nil]]
|
3643
|
-
[1m[36m (1.0ms)[0m [1mcommit transaction[0m
|
3644
|
-
[1m[35m (0.0ms)[0m begin transaction
|
3645
|
-
[1m[36mSQL (1.3ms)[0m [1mINSERT INTO "posts" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 23 May 2013 20:08:09 UTC +00:00], ["name", "culpa ut laboriosam eaque itaque"], ["updated_at", Thu, 23 May 2013 20:08:09 UTC +00:00], ["value", nil]]
|
3646
|
-
[1m[35m (0.9ms)[0m commit transaction
|
3647
|
-
[1m[36mActsRateable::Rate Load (0.6ms)[0m [1mSELECT "ar_rates".* FROM "ar_rates" WHERE "ar_rates"."resource_type" = 'Post' AND "ar_rates"."resource_id" = 106 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."author_id" = 202 LIMIT 1[0m
|
3648
|
-
[1m[35m (0.1ms)[0m begin transaction
|
3649
|
-
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 202 LIMIT 1[0m
|
3650
|
-
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 106 LIMIT 1
|
3651
|
-
[1m[36mActsRateable::Rate Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "ar_rates" WHERE ("ar_rates"."author_id" = 202 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."resource_id" = 106 AND "ar_rates"."resource_type" = 'Post') LIMIT 1[0m
|
3652
|
-
[1m[35mSQL (1.7ms)[0m INSERT INTO "ar_rates" ("author_id", "author_type", "created_at", "resource_id", "resource_type", "updated_at", "value") VALUES (?, ?, ?, ?, ?, ?, ?) [["author_id", 202], ["author_type", "User"], ["created_at", Thu, 23 May 2013 20:08:09 UTC +00:00], ["resource_id", 106], ["resource_type", "Post"], ["updated_at", Thu, 23 May 2013 20:08:09 UTC +00:00], ["value", 1]]
|
3653
|
-
[1m[36mActsRateable::Rating Load (0.5ms)[0m [1mSELECT "ar_ratings".* FROM "ar_ratings" WHERE "ar_ratings"."resource_type" = 'Post' AND "ar_ratings"."resource_id" = 106 LIMIT 1[0m
|
3654
|
-
[1m[35m (0.2ms)[0m SELECT COUNT(*) total_ratings, COALESCE(SUM(value),0) rating_sum, COALESCE(AVG(value),0) rating_avg FROM ar_rates WHERE resource_type = 'Post' and resource_id = '106'
|
3655
|
-
[1m[36m (1.6ms)[0m [1mSELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post') rated_count, ((SELECT COUNT(*) from ar_rates WHERE resource_type = 'Post') / (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post')) avg_num_ratings FROM ar_rates WHERE resource_type = 'Post'[0m
|
3656
|
-
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 106 LIMIT 1
|
3657
|
-
[1m[36mSQL (1.2ms)[0m [1mINSERT INTO "ar_ratings" ("average", "created_at", "estimate", "resource_id", "resource_type", "sum", "total", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["average", #<BigDecimal:7fb2b4579748,'0.1E1',9(45)>], ["created_at", Thu, 23 May 2013 20:08:09 UTC +00:00], ["estimate", #<BigDecimal:7fb2b4579518,'0.2440548780 487805E1',27(45)>], ["resource_id", 106], ["resource_type", "Post"], ["sum", 1], ["total", 1], ["updated_at", Thu, 23 May 2013 20:08:09 UTC +00:00]]
|
3658
|
-
[1m[35m (0.4ms)[0m SELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post') rated_count, ((SELECT COUNT(*) from ar_rates WHERE resource_type = 'Post') / (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post')) avg_num_ratings FROM ar_rates WHERE resource_type = 'Post'
|
3659
|
-
[1m[36m (1.1ms)[0m [1mcommit transaction[0m
|
3660
|
-
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "ar_rates" WHERE "ar_rates"."author_id" = 202 AND "ar_rates"."author_type" = 'User'
|
3661
|
-
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
3662
|
-
[1m[35mSQL (0.4ms)[0m INSERT INTO "users" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?) [["created_at", Thu, 23 May 2013 20:08:09 UTC +00:00], ["name", "Lelia"], ["updated_at", Thu, 23 May 2013 20:08:09 UTC +00:00], ["value", nil]]
|
3663
|
-
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
3664
|
-
[1m[35m (0.0ms)[0m begin transaction
|
3665
|
-
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "posts" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 23 May 2013 20:08:09 UTC +00:00], ["name", "consectetur nam modi possimus ipsa"], ["updated_at", Thu, 23 May 2013 20:08:09 UTC +00:00], ["value", nil]]
|
3666
|
-
[1m[35m (0.8ms)[0m commit transaction
|
3667
|
-
[1m[36mActsRateable::Rate Load (0.1ms)[0m [1mSELECT "ar_rates".* FROM "ar_rates" WHERE "ar_rates"."resource_type" = 'Post' AND "ar_rates"."resource_id" = 107 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."author_id" = 203 LIMIT 1[0m
|
3668
|
-
[1m[35m (0.0ms)[0m begin transaction
|
3669
|
-
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 203 LIMIT 1[0m
|
3670
|
-
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 107 LIMIT 1
|
3671
|
-
[1m[36mActsRateable::Rate Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "ar_rates" WHERE ("ar_rates"."author_id" = 203 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."resource_id" = 107 AND "ar_rates"."resource_type" = 'Post') LIMIT 1[0m
|
3672
|
-
[1m[35mSQL (0.3ms)[0m INSERT INTO "ar_rates" ("author_id", "author_type", "created_at", "resource_id", "resource_type", "updated_at", "value") VALUES (?, ?, ?, ?, ?, ?, ?) [["author_id", 203], ["author_type", "User"], ["created_at", Thu, 23 May 2013 20:08:09 UTC +00:00], ["resource_id", 107], ["resource_type", "Post"], ["updated_at", Thu, 23 May 2013 20:08:09 UTC +00:00], ["value", 5]]
|
3673
|
-
[1m[36mActsRateable::Rating Load (0.1ms)[0m [1mSELECT "ar_ratings".* FROM "ar_ratings" WHERE "ar_ratings"."resource_type" = 'Post' AND "ar_ratings"."resource_id" = 107 LIMIT 1[0m
|
3674
|
-
[1m[35m (0.1ms)[0m SELECT COUNT(*) total_ratings, COALESCE(SUM(value),0) rating_sum, COALESCE(AVG(value),0) rating_avg FROM ar_rates WHERE resource_type = 'Post' and resource_id = '107'
|
3675
|
-
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = 107 LIMIT 1[0m
|
3676
|
-
[1m[35mSQL (0.2ms)[0m INSERT INTO "ar_ratings" ("average", "created_at", "estimate", "resource_id", "resource_type", "sum", "total", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["average", #<BigDecimal:7fb2b196c5b0,'0.5E1',9(45)>], ["created_at", Thu, 23 May 2013 20:08:09 UTC +00:00], ["estimate", #<BigDecimal:7fb2b196c330,'0.3440548780 487805E1',27(45)>], ["resource_id", 107], ["resource_type", "Post"], ["sum", 5], ["total", 1], ["updated_at", Thu, 23 May 2013 20:08:09 UTC +00:00]]
|
3677
|
-
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post') rated_count, ((SELECT COUNT(*) from ar_rates WHERE resource_type = 'Post') / (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post')) avg_num_ratings FROM ar_rates WHERE resource_type = 'Post'[0m
|
3678
|
-
[1m[35m (0.6ms)[0m commit transaction
|
3679
|
-
[1m[36mActsRateable::Rating Load (0.2ms)[0m [1mSELECT "ar_ratings".* FROM "ar_ratings" WHERE "ar_ratings"."resource_id" = 107 AND "ar_ratings"."resource_type" = 'Post' LIMIT 1[0m
|
3680
|
-
[1m[35m (0.0ms)[0m begin transaction
|
3681
|
-
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "Esta"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
3682
|
-
[1m[35m (0.9ms)[0m commit transaction
|
3683
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
3684
|
-
[1m[35mSQL (0.3ms)[0m INSERT INTO "posts" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?) [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "repellendus ut sed qui qui"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
3685
|
-
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
3686
|
-
[1m[35mActsRateable::Rate Load (0.1ms)[0m SELECT "ar_rates".* FROM "ar_rates" WHERE "ar_rates"."resource_type" = 'Post' AND "ar_rates"."resource_id" = 108 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."author_id" = 204 LIMIT 1
|
3687
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
3688
|
-
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = 204 LIMIT 1
|
3689
|
-
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = 108 LIMIT 1[0m
|
3690
|
-
[1m[35mActsRateable::Rate Exists (0.1ms)[0m SELECT 1 AS one FROM "ar_rates" WHERE ("ar_rates"."author_id" = 204 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."resource_id" = 108 AND "ar_rates"."resource_type" = 'Post') LIMIT 1
|
3691
|
-
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "ar_rates" ("author_id", "author_type", "created_at", "resource_id", "resource_type", "updated_at", "value") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["author_id", 204], ["author_type", "User"], ["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["resource_id", 108], ["resource_type", "Post"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", 4]]
|
3692
|
-
[1m[35mActsRateable::Rating Load (0.1ms)[0m SELECT "ar_ratings".* FROM "ar_ratings" WHERE "ar_ratings"."resource_type" = 'Post' AND "ar_ratings"."resource_id" = 108 LIMIT 1
|
3693
|
-
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) total_ratings, COALESCE(SUM(value),0) rating_sum, COALESCE(AVG(value),0) rating_avg FROM ar_rates WHERE resource_type = 'Post' and resource_id = '108'[0m
|
3694
|
-
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 108 LIMIT 1
|
3695
|
-
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "ar_ratings" ("average", "created_at", "estimate", "resource_id", "resource_type", "sum", "total", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["average", #<BigDecimal:7fb2b4740090,'0.4E1',9(45)>], ["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["estimate", #<BigDecimal:7fb2b473fcd0,'0.32E1',18(45)>], ["resource_id", 108], ["resource_type", "Post"], ["sum", 4], ["total", 1], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00]]
|
3696
|
-
[1m[35m (0.4ms)[0m SELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post') rated_count, ((SELECT COUNT(*) from ar_rates WHERE resource_type = 'Post') / (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post')) avg_num_ratings FROM ar_rates WHERE resource_type = 'Post'
|
3697
|
-
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
3698
|
-
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "ar_rates" WHERE "ar_rates"."resource_id" = 108 AND "ar_rates"."resource_type" = 'Post'
|
3699
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
3700
|
-
[1m[35mSQL (0.4ms)[0m INSERT INTO "users" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?) [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "Jerrod"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
3701
|
-
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
3702
|
-
[1m[35m (0.0ms)[0m begin transaction
|
3703
|
-
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "posts" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "optio praesentium quas id accusamus"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
3704
|
-
[1m[35m (0.8ms)[0m commit transaction
|
3705
|
-
[1m[36mActsRateable::Rate Load (0.1ms)[0m [1mSELECT "ar_rates".* FROM "ar_rates" WHERE "ar_rates"."resource_type" = 'Post' AND "ar_rates"."resource_id" = 109 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."author_id" = 205 LIMIT 1[0m
|
3706
|
-
[1m[35m (0.0ms)[0m begin transaction
|
3707
|
-
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 205 LIMIT 1[0m
|
3708
|
-
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 109 LIMIT 1
|
3709
|
-
[1m[36mActsRateable::Rate Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "ar_rates" WHERE ("ar_rates"."author_id" = 205 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."resource_id" = 109 AND "ar_rates"."resource_type" = 'Post') LIMIT 1[0m
|
3710
|
-
[1m[35mSQL (0.3ms)[0m INSERT INTO "ar_rates" ("author_id", "author_type", "created_at", "resource_id", "resource_type", "updated_at", "value") VALUES (?, ?, ?, ?, ?, ?, ?) [["author_id", 205], ["author_type", "User"], ["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["resource_id", 109], ["resource_type", "Post"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", 3]]
|
3711
|
-
[1m[36mActsRateable::Rating Load (0.1ms)[0m [1mSELECT "ar_ratings".* FROM "ar_ratings" WHERE "ar_ratings"."resource_type" = 'Post' AND "ar_ratings"."resource_id" = 109 LIMIT 1[0m
|
3712
|
-
[1m[35m (0.1ms)[0m SELECT COUNT(*) total_ratings, COALESCE(SUM(value),0) rating_sum, COALESCE(AVG(value),0) rating_avg FROM ar_rates WHERE resource_type = 'Post' and resource_id = '109'
|
3713
|
-
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = 109 LIMIT 1[0m
|
3714
|
-
[1m[35mSQL (0.2ms)[0m INSERT INTO "ar_ratings" ("average", "created_at", "estimate", "resource_id", "resource_type", "sum", "total", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["average", #<BigDecimal:7fb2b727c380,'0.3E1',9(45)>], ["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["estimate", #<BigDecimal:7fb2b727c1c8,'0.2954819277 108434E1',27(45)>], ["resource_id", 109], ["resource_type", "Post"], ["sum", 3], ["total", 1], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00]]
|
3715
|
-
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post') rated_count, ((SELECT COUNT(*) from ar_rates WHERE resource_type = 'Post') / (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post')) avg_num_ratings FROM ar_rates WHERE resource_type = 'Post'[0m
|
3716
|
-
[1m[35m (0.9ms)[0m commit transaction
|
3717
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
3718
|
-
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?) [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "Graciela"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
3719
|
-
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
3720
|
-
[1m[35mActsRateable::Rate Load (0.1ms)[0m SELECT "ar_rates".* FROM "ar_rates" WHERE "ar_rates"."resource_type" = 'Post' AND "ar_rates"."resource_id" = 109 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."author_id" = 206 LIMIT 1
|
3721
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
3722
|
-
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = 206 LIMIT 1
|
3723
|
-
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = 109 LIMIT 1[0m
|
3724
|
-
[1m[35mActsRateable::Rate Exists (0.1ms)[0m SELECT 1 AS one FROM "ar_rates" WHERE ("ar_rates"."author_id" = 206 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."resource_id" = 109 AND "ar_rates"."resource_type" = 'Post') LIMIT 1
|
3725
|
-
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "ar_rates" ("author_id", "author_type", "created_at", "resource_id", "resource_type", "updated_at", "value") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["author_id", 206], ["author_type", "User"], ["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["resource_id", 109], ["resource_type", "Post"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", 3]]
|
3726
|
-
[1m[35mActsRateable::Rating Load (0.1ms)[0m SELECT "ar_ratings".* FROM "ar_ratings" WHERE "ar_ratings"."resource_type" = 'Post' AND "ar_ratings"."resource_id" = 109 LIMIT 1
|
3727
|
-
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) total_ratings, COALESCE(SUM(value),0) rating_sum, COALESCE(AVG(value),0) rating_avg FROM ar_rates WHERE resource_type = 'Post' and resource_id = '109'[0m
|
3728
|
-
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 109 LIMIT 1
|
3729
|
-
[1m[36m (0.1ms)[0m [1mUPDATE "ar_ratings" SET "total" = 2, "sum" = 6, "estimate" = 2.964071856287426, "updated_at" = '2013-05-23 20:08:10.046271' WHERE "ar_ratings"."id" = 83[0m
|
3730
|
-
[1m[35m (0.4ms)[0m SELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post') rated_count, ((SELECT COUNT(*) from ar_rates WHERE resource_type = 'Post') / (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post')) avg_num_ratings FROM ar_rates WHERE resource_type = 'Post'
|
3731
|
-
[1m[36m (1.0ms)[0m [1mcommit transaction[0m
|
3732
|
-
[1m[35m (0.0ms)[0m begin transaction
|
3733
|
-
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "Yolanda"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
3734
|
-
[1m[35m (0.9ms)[0m commit transaction
|
3735
|
-
[1m[36mActsRateable::Rate Load (0.1ms)[0m [1mSELECT "ar_rates".* FROM "ar_rates" WHERE "ar_rates"."resource_type" = 'Post' AND "ar_rates"."resource_id" = 109 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."author_id" = 207 LIMIT 1[0m
|
3736
|
-
[1m[35m (0.0ms)[0m begin transaction
|
3737
|
-
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 207 LIMIT 1[0m
|
3738
|
-
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 109 LIMIT 1
|
3739
|
-
[1m[36mActsRateable::Rate Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "ar_rates" WHERE ("ar_rates"."author_id" = 207 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."resource_id" = 109 AND "ar_rates"."resource_type" = 'Post') LIMIT 1[0m
|
3740
|
-
[1m[35mSQL (0.4ms)[0m INSERT INTO "ar_rates" ("author_id", "author_type", "created_at", "resource_id", "resource_type", "updated_at", "value") VALUES (?, ?, ?, ?, ?, ?, ?) [["author_id", 207], ["author_type", "User"], ["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["resource_id", 109], ["resource_type", "Post"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", 2]]
|
3741
|
-
[1m[36mActsRateable::Rating Load (0.1ms)[0m [1mSELECT "ar_ratings".* FROM "ar_ratings" WHERE "ar_ratings"."resource_type" = 'Post' AND "ar_ratings"."resource_id" = 109 LIMIT 1[0m
|
3742
|
-
[1m[35m (0.1ms)[0m SELECT COUNT(*) total_ratings, COALESCE(SUM(value),0) rating_sum, COALESCE(AVG(value),0) rating_avg FROM ar_rates WHERE resource_type = 'Post' and resource_id = '109'
|
3743
|
-
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = 109 LIMIT 1[0m
|
3744
|
-
[1m[35m (0.1ms)[0m UPDATE "ar_ratings" SET "total" = 3, "average" = 2.666666666666667, "sum" = 8, "estimate" = 2.803571428571429, "updated_at" = '2013-05-23 20:08:10.059742' WHERE "ar_ratings"."id" = 83
|
3745
|
-
[1m[36m (0.5ms)[0m [1mSELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post') rated_count, ((SELECT COUNT(*) from ar_rates WHERE resource_type = 'Post') / (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post')) avg_num_ratings FROM ar_rates WHERE resource_type = 'Post'[0m
|
3746
|
-
[1m[35m (1.0ms)[0m commit transaction
|
3747
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
3748
|
-
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?) [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "Zane"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
3749
|
-
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
3750
|
-
[1m[35mActsRateable::Rate Load (0.1ms)[0m SELECT "ar_rates".* FROM "ar_rates" WHERE "ar_rates"."resource_type" = 'Post' AND "ar_rates"."resource_id" = 109 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."author_id" = 208 LIMIT 1
|
3751
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
3752
|
-
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = 208 LIMIT 1
|
3753
|
-
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = 109 LIMIT 1[0m
|
3754
|
-
[1m[35mActsRateable::Rate Exists (0.1ms)[0m SELECT 1 AS one FROM "ar_rates" WHERE ("ar_rates"."author_id" = 208 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."resource_id" = 109 AND "ar_rates"."resource_type" = 'Post') LIMIT 1
|
3755
|
-
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "ar_rates" ("author_id", "author_type", "created_at", "resource_id", "resource_type", "updated_at", "value") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["author_id", 208], ["author_type", "User"], ["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["resource_id", 109], ["resource_type", "Post"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", 1]]
|
3756
|
-
[1m[35mActsRateable::Rating Load (0.1ms)[0m SELECT "ar_ratings".* FROM "ar_ratings" WHERE "ar_ratings"."resource_type" = 'Post' AND "ar_ratings"."resource_id" = 109 LIMIT 1
|
3757
|
-
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) total_ratings, COALESCE(SUM(value),0) rating_sum, COALESCE(AVG(value),0) rating_avg FROM ar_rates WHERE resource_type = 'Post' and resource_id = '109'[0m
|
3758
|
-
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 109 LIMIT 1
|
3759
|
-
[1m[36m (0.1ms)[0m [1mUPDATE "ar_ratings" SET "total" = 4, "average" = 2.25, "sum" = 9, "estimate" = 2.543533389687235, "updated_at" = '2013-05-23 20:08:10.071685' WHERE "ar_ratings"."id" = 83[0m
|
3760
|
-
[1m[35m (0.4ms)[0m SELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post') rated_count, ((SELECT COUNT(*) from ar_rates WHERE resource_type = 'Post') / (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post')) avg_num_ratings FROM ar_rates WHERE resource_type = 'Post'
|
3761
|
-
[1m[36m (1.0ms)[0m [1mcommit transaction[0m
|
3762
|
-
[1m[35m (0.0ms)[0m begin transaction
|
3763
|
-
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "Alvena"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
3764
|
-
[1m[35m (0.8ms)[0m commit transaction
|
3765
|
-
[1m[36mActsRateable::Rate Load (0.1ms)[0m [1mSELECT "ar_rates".* FROM "ar_rates" WHERE "ar_rates"."resource_type" = 'Post' AND "ar_rates"."resource_id" = 109 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."author_id" = 209 LIMIT 1[0m
|
3766
|
-
[1m[35m (0.0ms)[0m begin transaction
|
3767
|
-
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 209 LIMIT 1[0m
|
3768
|
-
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 109 LIMIT 1
|
3769
|
-
[1m[36mActsRateable::Rate Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "ar_rates" WHERE ("ar_rates"."author_id" = 209 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."resource_id" = 109 AND "ar_rates"."resource_type" = 'Post') LIMIT 1[0m
|
3770
|
-
[1m[35mSQL (0.3ms)[0m INSERT INTO "ar_rates" ("author_id", "author_type", "created_at", "resource_id", "resource_type", "updated_at", "value") VALUES (?, ?, ?, ?, ?, ?, ?) [["author_id", 209], ["author_type", "User"], ["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["resource_id", 109], ["resource_type", "Post"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", 5]]
|
3771
|
-
[1m[36mActsRateable::Rating Load (0.1ms)[0m [1mSELECT "ar_ratings".* FROM "ar_ratings" WHERE "ar_ratings"."resource_type" = 'Post' AND "ar_ratings"."resource_id" = 109 LIMIT 1[0m
|
3772
|
-
[1m[35m (0.1ms)[0m SELECT COUNT(*) total_ratings, COALESCE(SUM(value),0) rating_sum, COALESCE(AVG(value),0) rating_avg FROM ar_rates WHERE resource_type = 'Post' and resource_id = '109'
|
3773
|
-
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = 109 LIMIT 1[0m
|
3774
|
-
[1m[35m (0.1ms)[0m UPDATE "ar_ratings" SET "total" = 5, "average" = 2.8, "sum" = 14, "estimate" = 2.846323529411765, "updated_at" = '2013-05-23 20:08:10.083564' WHERE "ar_ratings"."id" = 83
|
3775
|
-
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post') rated_count, ((SELECT COUNT(*) from ar_rates WHERE resource_type = 'Post') / (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post')) avg_num_ratings FROM ar_rates WHERE resource_type = 'Post'[0m
|
3776
|
-
[1m[35m (0.8ms)[0m commit transaction
|
3777
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
3778
|
-
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?) [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "Hailie"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
3779
|
-
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
3780
|
-
[1m[35mActsRateable::Rate Load (0.1ms)[0m SELECT "ar_rates".* FROM "ar_rates" WHERE "ar_rates"."resource_type" = 'Post' AND "ar_rates"."resource_id" = 109 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."author_id" = 210 LIMIT 1
|
3781
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
3782
|
-
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = 210 LIMIT 1
|
3783
|
-
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = 109 LIMIT 1[0m
|
3784
|
-
[1m[35mActsRateable::Rate Exists (0.1ms)[0m SELECT 1 AS one FROM "ar_rates" WHERE ("ar_rates"."author_id" = 210 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."resource_id" = 109 AND "ar_rates"."resource_type" = 'Post') LIMIT 1
|
3785
|
-
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "ar_rates" ("author_id", "author_type", "created_at", "resource_id", "resource_type", "updated_at", "value") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["author_id", 210], ["author_type", "User"], ["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["resource_id", 109], ["resource_type", "Post"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", 4]]
|
3786
|
-
[1m[35mActsRateable::Rating Load (0.1ms)[0m SELECT "ar_ratings".* FROM "ar_ratings" WHERE "ar_ratings"."resource_type" = 'Post' AND "ar_ratings"."resource_id" = 109 LIMIT 1
|
3787
|
-
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) total_ratings, COALESCE(SUM(value),0) rating_sum, COALESCE(AVG(value),0) rating_avg FROM ar_rates WHERE resource_type = 'Post' and resource_id = '109'[0m
|
3788
|
-
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 109 LIMIT 1
|
3789
|
-
[1m[36m (0.1ms)[0m [1mUPDATE "ar_ratings" SET "total" = 6, "average" = 3.0, "sum" = 18, "estimate" = 2.978557504873294, "updated_at" = '2013-05-23 20:08:10.095177' WHERE "ar_ratings"."id" = 83[0m
|
3790
|
-
[1m[35m (0.4ms)[0m SELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post') rated_count, ((SELECT COUNT(*) from ar_rates WHERE resource_type = 'Post') / (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post')) avg_num_ratings FROM ar_rates WHERE resource_type = 'Post'
|
3791
|
-
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
3792
|
-
[1m[35m (0.0ms)[0m begin transaction
|
3793
|
-
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "Walker"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
3794
|
-
[1m[35m (0.9ms)[0m commit transaction
|
3795
|
-
[1m[36mActsRateable::Rate Load (0.1ms)[0m [1mSELECT "ar_rates".* FROM "ar_rates" WHERE "ar_rates"."resource_type" = 'Post' AND "ar_rates"."resource_id" = 109 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."author_id" = 211 LIMIT 1[0m
|
3796
|
-
[1m[35m (0.0ms)[0m begin transaction
|
3797
|
-
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 211 LIMIT 1[0m
|
3798
|
-
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 109 LIMIT 1
|
3799
|
-
[1m[36mActsRateable::Rate Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "ar_rates" WHERE ("ar_rates"."author_id" = 211 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."resource_id" = 109 AND "ar_rates"."resource_type" = 'Post') LIMIT 1[0m
|
3800
|
-
[1m[35mSQL (0.4ms)[0m INSERT INTO "ar_rates" ("author_id", "author_type", "created_at", "resource_id", "resource_type", "updated_at", "value") VALUES (?, ?, ?, ?, ?, ?, ?) [["author_id", 211], ["author_type", "User"], ["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["resource_id", 109], ["resource_type", "Post"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", 3]]
|
3801
|
-
[1m[36mActsRateable::Rating Load (0.1ms)[0m [1mSELECT "ar_ratings".* FROM "ar_ratings" WHERE "ar_ratings"."resource_type" = 'Post' AND "ar_ratings"."resource_id" = 109 LIMIT 1[0m
|
3802
|
-
[1m[35m (0.1ms)[0m SELECT COUNT(*) total_ratings, COALESCE(SUM(value),0) rating_sum, COALESCE(AVG(value),0) rating_avg FROM ar_rates WHERE resource_type = 'Post' and resource_id = '109'
|
3803
|
-
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = 109 LIMIT 1[0m
|
3804
|
-
[1m[35m (0.1ms)[0m UPDATE "ar_ratings" SET "total" = 7, "sum" = 21, "estimate" = 2.982558139534883, "updated_at" = '2013-05-23 20:08:10.106856' WHERE "ar_ratings"."id" = 83
|
3805
|
-
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post') rated_count, ((SELECT COUNT(*) from ar_rates WHERE resource_type = 'Post') / (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post')) avg_num_ratings FROM ar_rates WHERE resource_type = 'Post'[0m
|
3806
|
-
[1m[35m (0.9ms)[0m commit transaction
|
3807
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
3808
|
-
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?) [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "Gustave"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
3809
|
-
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
3810
|
-
[1m[35mActsRateable::Rate Load (0.1ms)[0m SELECT "ar_rates".* FROM "ar_rates" WHERE "ar_rates"."resource_type" = 'Post' AND "ar_rates"."resource_id" = 109 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."author_id" = 212 LIMIT 1
|
3811
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
3812
|
-
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = 212 LIMIT 1
|
3813
|
-
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = 109 LIMIT 1[0m
|
3814
|
-
[1m[35mActsRateable::Rate Exists (0.1ms)[0m SELECT 1 AS one FROM "ar_rates" WHERE ("ar_rates"."author_id" = 212 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."resource_id" = 109 AND "ar_rates"."resource_type" = 'Post') LIMIT 1
|
3815
|
-
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "ar_rates" ("author_id", "author_type", "created_at", "resource_id", "resource_type", "updated_at", "value") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["author_id", 212], ["author_type", "User"], ["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["resource_id", 109], ["resource_type", "Post"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", 3]]
|
3816
|
-
[1m[35mActsRateable::Rating Load (0.1ms)[0m SELECT "ar_ratings".* FROM "ar_ratings" WHERE "ar_ratings"."resource_type" = 'Post' AND "ar_ratings"."resource_id" = 109 LIMIT 1
|
3817
|
-
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) total_ratings, COALESCE(SUM(value),0) rating_sum, COALESCE(AVG(value),0) rating_avg FROM ar_rates WHERE resource_type = 'Post' and resource_id = '109'[0m
|
3818
|
-
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 109 LIMIT 1
|
3819
|
-
[1m[36m (0.1ms)[0m [1mUPDATE "ar_ratings" SET "total" = 8, "sum" = 24, "estimate" = 2.984235417761429, "updated_at" = '2013-05-23 20:08:10.118344' WHERE "ar_ratings"."id" = 83[0m
|
3820
|
-
[1m[35m (0.4ms)[0m SELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post') rated_count, ((SELECT COUNT(*) from ar_rates WHERE resource_type = 'Post') / (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post')) avg_num_ratings FROM ar_rates WHERE resource_type = 'Post'
|
3821
|
-
[1m[36m (1.0ms)[0m [1mcommit transaction[0m
|
3822
|
-
[1m[35m (0.0ms)[0m begin transaction
|
3823
|
-
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "Adolph"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
3824
|
-
[1m[35m (0.7ms)[0m commit transaction
|
3825
|
-
[1m[36mActsRateable::Rate Load (0.1ms)[0m [1mSELECT "ar_rates".* FROM "ar_rates" WHERE "ar_rates"."resource_type" = 'Post' AND "ar_rates"."resource_id" = 109 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."author_id" = 213 LIMIT 1[0m
|
3826
|
-
[1m[35m (0.0ms)[0m begin transaction
|
3827
|
-
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 213 LIMIT 1[0m
|
3828
|
-
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 109 LIMIT 1
|
3829
|
-
[1m[36mActsRateable::Rate Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "ar_rates" WHERE ("ar_rates"."author_id" = 213 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."resource_id" = 109 AND "ar_rates"."resource_type" = 'Post') LIMIT 1[0m
|
3830
|
-
[1m[35mSQL (0.4ms)[0m INSERT INTO "ar_rates" ("author_id", "author_type", "created_at", "resource_id", "resource_type", "updated_at", "value") VALUES (?, ?, ?, ?, ?, ?, ?) [["author_id", 213], ["author_type", "User"], ["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["resource_id", 109], ["resource_type", "Post"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", 1]]
|
3831
|
-
[1m[36mActsRateable::Rating Load (0.1ms)[0m [1mSELECT "ar_ratings".* FROM "ar_ratings" WHERE "ar_ratings"."resource_type" = 'Post' AND "ar_ratings"."resource_id" = 109 LIMIT 1[0m
|
3832
|
-
[1m[35m (0.1ms)[0m SELECT COUNT(*) total_ratings, COALESCE(SUM(value),0) rating_sum, COALESCE(AVG(value),0) rating_avg FROM ar_rates WHERE resource_type = 'Post' and resource_id = '109'
|
3833
|
-
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = 109 LIMIT 1[0m
|
3834
|
-
[1m[35m (0.1ms)[0m UPDATE "ar_ratings" SET "total" = 9, "average" = 2.777777777777778, "sum" = 25, "estimate" = 2.818965517241379, "updated_at" = '2013-05-23 20:08:10.129893' WHERE "ar_ratings"."id" = 83
|
3835
|
-
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post') rated_count, ((SELECT COUNT(*) from ar_rates WHERE resource_type = 'Post') / (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post')) avg_num_ratings FROM ar_rates WHERE resource_type = 'Post'[0m
|
3836
|
-
[1m[35m (0.9ms)[0m commit transaction
|
3837
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
3838
|
-
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?) [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "Kian"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
3839
|
-
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
3840
|
-
[1m[35mActsRateable::Rate Load (0.1ms)[0m SELECT "ar_rates".* FROM "ar_rates" WHERE "ar_rates"."resource_type" = 'Post' AND "ar_rates"."resource_id" = 109 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."author_id" = 214 LIMIT 1
|
3841
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
3842
|
-
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = 214 LIMIT 1
|
3843
|
-
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = 109 LIMIT 1[0m
|
3844
|
-
[1m[35mActsRateable::Rate Exists (0.1ms)[0m SELECT 1 AS one FROM "ar_rates" WHERE ("ar_rates"."author_id" = 214 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."resource_id" = 109 AND "ar_rates"."resource_type" = 'Post') LIMIT 1
|
3845
|
-
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "ar_rates" ("author_id", "author_type", "created_at", "resource_id", "resource_type", "updated_at", "value") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["author_id", 214], ["author_type", "User"], ["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["resource_id", 109], ["resource_type", "Post"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", 1]]
|
3846
|
-
[1m[35mActsRateable::Rating Load (0.1ms)[0m SELECT "ar_ratings".* FROM "ar_ratings" WHERE "ar_ratings"."resource_type" = 'Post' AND "ar_ratings"."resource_id" = 109 LIMIT 1
|
3847
|
-
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) total_ratings, COALESCE(SUM(value),0) rating_sum, COALESCE(AVG(value),0) rating_avg FROM ar_rates WHERE resource_type = 'Post' and resource_id = '109'[0m
|
3848
|
-
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 109 LIMIT 1
|
3849
|
-
[1m[36m (0.1ms)[0m [1mUPDATE "ar_ratings" SET "total" = 10, "average" = 2.6, "sum" = 26, "estimate" = 2.676483516483517, "updated_at" = '2013-05-23 20:08:10.141559' WHERE "ar_ratings"."id" = 83[0m
|
3850
|
-
[1m[35m (0.4ms)[0m SELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post') rated_count, ((SELECT COUNT(*) from ar_rates WHERE resource_type = 'Post') / (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post')) avg_num_ratings FROM ar_rates WHERE resource_type = 'Post'
|
3851
|
-
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
3852
|
-
[1m[35m (0.0ms)[0m begin transaction
|
3853
|
-
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "Jamal"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
3854
|
-
[1m[35m (0.9ms)[0m commit transaction
|
3855
|
-
[1m[36mActsRateable::Rate Load (0.1ms)[0m [1mSELECT "ar_rates".* FROM "ar_rates" WHERE "ar_rates"."resource_type" = 'Post' AND "ar_rates"."resource_id" = 109 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."author_id" = 215 LIMIT 1[0m
|
3856
|
-
[1m[35m (0.0ms)[0m begin transaction
|
3857
|
-
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 215 LIMIT 1[0m
|
3858
|
-
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 109 LIMIT 1
|
3859
|
-
[1m[36mActsRateable::Rate Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "ar_rates" WHERE ("ar_rates"."author_id" = 215 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."resource_id" = 109 AND "ar_rates"."resource_type" = 'Post') LIMIT 1[0m
|
3860
|
-
[1m[35mSQL (0.3ms)[0m INSERT INTO "ar_rates" ("author_id", "author_type", "created_at", "resource_id", "resource_type", "updated_at", "value") VALUES (?, ?, ?, ?, ?, ?, ?) [["author_id", 215], ["author_type", "User"], ["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["resource_id", 109], ["resource_type", "Post"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", 5]]
|
3861
|
-
[1m[36mActsRateable::Rating Load (0.1ms)[0m [1mSELECT "ar_ratings".* FROM "ar_ratings" WHERE "ar_ratings"."resource_type" = 'Post' AND "ar_ratings"."resource_id" = 109 LIMIT 1[0m
|
3862
|
-
[1m[35m (0.1ms)[0m SELECT COUNT(*) total_ratings, COALESCE(SUM(value),0) rating_sum, COALESCE(AVG(value),0) rating_avg FROM ar_rates WHERE resource_type = 'Post' and resource_id = '109'
|
3863
|
-
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = 109 LIMIT 1[0m
|
3864
|
-
[1m[35m (0.1ms)[0m UPDATE "ar_ratings" SET "total" = 11, "average" = 2.818181818181818, "sum" = 31, "estimate" = 2.840097402597403, "updated_at" = '2013-05-23 20:08:10.153205' WHERE "ar_ratings"."id" = 83
|
3865
|
-
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post') rated_count, ((SELECT COUNT(*) from ar_rates WHERE resource_type = 'Post') / (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post')) avg_num_ratings FROM ar_rates WHERE resource_type = 'Post'[0m
|
3866
|
-
[1m[35m (1.0ms)[0m commit transaction
|
3867
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
3868
|
-
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?) [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "Aurore"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
3869
|
-
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
3870
|
-
[1m[35mActsRateable::Rate Load (0.1ms)[0m SELECT "ar_rates".* FROM "ar_rates" WHERE "ar_rates"."resource_type" = 'Post' AND "ar_rates"."resource_id" = 109 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."author_id" = 216 LIMIT 1
|
3871
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
3872
|
-
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = 216 LIMIT 1
|
3873
|
-
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = 109 LIMIT 1[0m
|
3874
|
-
[1m[35mActsRateable::Rate Exists (0.1ms)[0m SELECT 1 AS one FROM "ar_rates" WHERE ("ar_rates"."author_id" = 216 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."resource_id" = 109 AND "ar_rates"."resource_type" = 'Post') LIMIT 1
|
3875
|
-
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "ar_rates" ("author_id", "author_type", "created_at", "resource_id", "resource_type", "updated_at", "value") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["author_id", 216], ["author_type", "User"], ["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["resource_id", 109], ["resource_type", "Post"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", 5]]
|
3876
|
-
[1m[35mActsRateable::Rating Load (0.1ms)[0m SELECT "ar_ratings".* FROM "ar_ratings" WHERE "ar_ratings"."resource_type" = 'Post' AND "ar_ratings"."resource_id" = 109 LIMIT 1
|
3877
|
-
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) total_ratings, COALESCE(SUM(value),0) rating_sum, COALESCE(AVG(value),0) rating_avg FROM ar_rates WHERE resource_type = 'Post' and resource_id = '109'[0m
|
3878
|
-
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 109 LIMIT 1
|
3879
|
-
[1m[36m (0.1ms)[0m [1mUPDATE "ar_ratings" SET "total" = 12, "average" = 3.0, "sum" = 36, "estimate" = 2.986440677966102, "updated_at" = '2013-05-23 20:08:10.164959' WHERE "ar_ratings"."id" = 83[0m
|
3880
|
-
[1m[35m (0.4ms)[0m SELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post') rated_count, ((SELECT COUNT(*) from ar_rates WHERE resource_type = 'Post') / (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post')) avg_num_ratings FROM ar_rates WHERE resource_type = 'Post'
|
3881
|
-
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
3882
|
-
[1m[35m (0.0ms)[0m begin transaction
|
3883
|
-
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "Marty"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
3884
|
-
[1m[35m (0.9ms)[0m commit transaction
|
3885
|
-
[1m[36mActsRateable::Rate Load (0.1ms)[0m [1mSELECT "ar_rates".* FROM "ar_rates" WHERE "ar_rates"."resource_type" = 'Post' AND "ar_rates"."resource_id" = 109 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."author_id" = 217 LIMIT 1[0m
|
3886
|
-
[1m[35m (0.0ms)[0m begin transaction
|
3887
|
-
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 217 LIMIT 1[0m
|
3888
|
-
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 109 LIMIT 1
|
3889
|
-
[1m[36mActsRateable::Rate Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "ar_rates" WHERE ("ar_rates"."author_id" = 217 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."resource_id" = 109 AND "ar_rates"."resource_type" = 'Post') LIMIT 1[0m
|
3890
|
-
[1m[35mSQL (0.4ms)[0m INSERT INTO "ar_rates" ("author_id", "author_type", "created_at", "resource_id", "resource_type", "updated_at", "value") VALUES (?, ?, ?, ?, ?, ?, ?) [["author_id", 217], ["author_type", "User"], ["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["resource_id", 109], ["resource_type", "Post"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", 4]]
|
3891
|
-
[1m[36mActsRateable::Rating Load (0.1ms)[0m [1mSELECT "ar_ratings".* FROM "ar_ratings" WHERE "ar_ratings"."resource_type" = 'Post' AND "ar_ratings"."resource_id" = 109 LIMIT 1[0m
|
3892
|
-
[1m[35m (0.1ms)[0m SELECT COUNT(*) total_ratings, COALESCE(SUM(value),0) rating_sum, COALESCE(AVG(value),0) rating_avg FROM ar_rates WHERE resource_type = 'Post' and resource_id = '109'
|
3893
|
-
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = 109 LIMIT 1[0m
|
3894
|
-
[1m[35m (0.1ms)[0m UPDATE "ar_ratings" SET "total" = 13, "average" = 3.076923076923077, "sum" = 40, "estimate" = 3.051966292134832, "updated_at" = '2013-05-23 20:08:10.176351' WHERE "ar_ratings"."id" = 83
|
3895
|
-
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post') rated_count, ((SELECT COUNT(*) from ar_rates WHERE resource_type = 'Post') / (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post')) avg_num_ratings FROM ar_rates WHERE resource_type = 'Post'[0m
|
3896
|
-
[1m[35m (1.0ms)[0m commit transaction
|
3897
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
3898
|
-
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?) [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "Dortha"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
3899
|
-
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
3900
|
-
[1m[35mActsRateable::Rate Load (0.1ms)[0m SELECT "ar_rates".* FROM "ar_rates" WHERE "ar_rates"."resource_type" = 'Post' AND "ar_rates"."resource_id" = 109 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."author_id" = 218 LIMIT 1
|
3901
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
3902
|
-
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = 218 LIMIT 1
|
3903
|
-
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = 109 LIMIT 1[0m
|
3904
|
-
[1m[35mActsRateable::Rate Exists (0.1ms)[0m SELECT 1 AS one FROM "ar_rates" WHERE ("ar_rates"."author_id" = 218 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."resource_id" = 109 AND "ar_rates"."resource_type" = 'Post') LIMIT 1
|
3905
|
-
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "ar_rates" ("author_id", "author_type", "created_at", "resource_id", "resource_type", "updated_at", "value") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["author_id", 218], ["author_type", "User"], ["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["resource_id", 109], ["resource_type", "Post"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", 1]]
|
3906
|
-
[1m[35mActsRateable::Rating Load (0.1ms)[0m SELECT "ar_ratings".* FROM "ar_ratings" WHERE "ar_ratings"."resource_type" = 'Post' AND "ar_ratings"."resource_id" = 109 LIMIT 1
|
3907
|
-
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) total_ratings, COALESCE(SUM(value),0) rating_sum, COALESCE(AVG(value),0) rating_avg FROM ar_rates WHERE resource_type = 'Post' and resource_id = '109'[0m
|
3908
|
-
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 109 LIMIT 1
|
3909
|
-
[1m[36m (0.1ms)[0m [1mUPDATE "ar_ratings" SET "total" = 14, "average" = 2.928571428571428, "sum" = 41, "estimate" = 2.932303647716069, "updated_at" = '2013-05-23 20:08:10.187970' WHERE "ar_ratings"."id" = 83[0m
|
3910
|
-
[1m[35m (0.4ms)[0m SELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post') rated_count, ((SELECT COUNT(*) from ar_rates WHERE resource_type = 'Post') / (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post')) avg_num_ratings FROM ar_rates WHERE resource_type = 'Post'
|
3911
|
-
[1m[36m (1.0ms)[0m [1mcommit transaction[0m
|
3912
|
-
[1m[35m (0.0ms)[0m begin transaction
|
3913
|
-
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "Levi"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
3914
|
-
[1m[35m (0.9ms)[0m commit transaction
|
3915
|
-
[1m[36mActsRateable::Rate Load (0.1ms)[0m [1mSELECT "ar_rates".* FROM "ar_rates" WHERE "ar_rates"."resource_type" = 'Post' AND "ar_rates"."resource_id" = 109 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."author_id" = 219 LIMIT 1[0m
|
3916
|
-
[1m[35m (0.0ms)[0m begin transaction
|
3917
|
-
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 219 LIMIT 1[0m
|
3918
|
-
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 109 LIMIT 1
|
3919
|
-
[1m[36mActsRateable::Rate Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "ar_rates" WHERE ("ar_rates"."author_id" = 219 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."resource_id" = 109 AND "ar_rates"."resource_type" = 'Post') LIMIT 1[0m
|
3920
|
-
[1m[35mSQL (0.3ms)[0m INSERT INTO "ar_rates" ("author_id", "author_type", "created_at", "resource_id", "resource_type", "updated_at", "value") VALUES (?, ?, ?, ?, ?, ?, ?) [["author_id", 219], ["author_type", "User"], ["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["resource_id", 109], ["resource_type", "Post"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", 1]]
|
3921
|
-
[1m[36mActsRateable::Rating Load (0.1ms)[0m [1mSELECT "ar_ratings".* FROM "ar_ratings" WHERE "ar_ratings"."resource_type" = 'Post' AND "ar_ratings"."resource_id" = 109 LIMIT 1[0m
|
3922
|
-
[1m[35m (0.1ms)[0m SELECT COUNT(*) total_ratings, COALESCE(SUM(value),0) rating_sum, COALESCE(AVG(value),0) rating_avg FROM ar_rates WHERE resource_type = 'Post' and resource_id = '109'
|
3923
|
-
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = 109 LIMIT 1[0m
|
3924
|
-
[1m[35m (0.1ms)[0m UPDATE "ar_ratings" SET "total" = 15, "average" = 2.8, "sum" = 42, "estimate" = 2.823148148148148, "updated_at" = '2013-05-23 20:08:10.199555' WHERE "ar_ratings"."id" = 83
|
3925
|
-
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post') rated_count, ((SELECT COUNT(*) from ar_rates WHERE resource_type = 'Post') / (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post')) avg_num_ratings FROM ar_rates WHERE resource_type = 'Post'[0m
|
3926
|
-
[1m[35m (0.9ms)[0m commit transaction
|
3927
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
3928
|
-
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?) [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "Anissa"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
3929
|
-
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
3930
|
-
[1m[35mActsRateable::Rate Load (0.2ms)[0m SELECT "ar_rates".* FROM "ar_rates" WHERE "ar_rates"."resource_type" = 'Post' AND "ar_rates"."resource_id" = 109 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."author_id" = 220 LIMIT 1
|
3931
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
3932
|
-
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = 220 LIMIT 1
|
3933
|
-
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = 109 LIMIT 1[0m
|
3934
|
-
[1m[35mActsRateable::Rate Exists (0.1ms)[0m SELECT 1 AS one FROM "ar_rates" WHERE ("ar_rates"."author_id" = 220 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."resource_id" = 109 AND "ar_rates"."resource_type" = 'Post') LIMIT 1
|
3935
|
-
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "ar_rates" ("author_id", "author_type", "created_at", "resource_id", "resource_type", "updated_at", "value") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["author_id", 220], ["author_type", "User"], ["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["resource_id", 109], ["resource_type", "Post"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", 5]]
|
3936
|
-
[1m[35mActsRateable::Rating Load (0.1ms)[0m SELECT "ar_ratings".* FROM "ar_ratings" WHERE "ar_ratings"."resource_type" = 'Post' AND "ar_ratings"."resource_id" = 109 LIMIT 1
|
3937
|
-
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) total_ratings, COALESCE(SUM(value),0) rating_sum, COALESCE(AVG(value),0) rating_avg FROM ar_rates WHERE resource_type = 'Post' and resource_id = '109'[0m
|
3938
|
-
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 109 LIMIT 1
|
3939
|
-
[1m[36m (0.1ms)[0m [1mUPDATE "ar_ratings" SET "total" = 16, "average" = 2.9375, "sum" = 47, "estimate" = 2.936027915091596, "updated_at" = '2013-05-23 20:08:10.249967' WHERE "ar_ratings"."id" = 83[0m
|
3940
|
-
[1m[35m (0.4ms)[0m SELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post') rated_count, ((SELECT COUNT(*) from ar_rates WHERE resource_type = 'Post') / (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post')) avg_num_ratings FROM ar_rates WHERE resource_type = 'Post'
|
3941
|
-
[1m[36m (1.1ms)[0m [1mcommit transaction[0m
|
3942
|
-
[1m[35m (0.0ms)[0m begin transaction
|
3943
|
-
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "Nikko"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
3944
|
-
[1m[35m (0.9ms)[0m commit transaction
|
3945
|
-
[1m[36mActsRateable::Rate Load (0.1ms)[0m [1mSELECT "ar_rates".* FROM "ar_rates" WHERE "ar_rates"."resource_type" = 'Post' AND "ar_rates"."resource_id" = 109 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."author_id" = 221 LIMIT 1[0m
|
3946
|
-
[1m[35m (0.0ms)[0m begin transaction
|
3947
|
-
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 221 LIMIT 1[0m
|
3948
|
-
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 109 LIMIT 1
|
3949
|
-
[1m[36mActsRateable::Rate Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "ar_rates" WHERE ("ar_rates"."author_id" = 221 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."resource_id" = 109 AND "ar_rates"."resource_type" = 'Post') LIMIT 1[0m
|
3950
|
-
[1m[35mSQL (0.3ms)[0m INSERT INTO "ar_rates" ("author_id", "author_type", "created_at", "resource_id", "resource_type", "updated_at", "value") VALUES (?, ?, ?, ?, ?, ?, ?) [["author_id", 221], ["author_type", "User"], ["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["resource_id", 109], ["resource_type", "Post"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", 5]]
|
3951
|
-
[1m[36mActsRateable::Rating Load (0.1ms)[0m [1mSELECT "ar_ratings".* FROM "ar_ratings" WHERE "ar_ratings"."resource_type" = 'Post' AND "ar_ratings"."resource_id" = 109 LIMIT 1[0m
|
3952
|
-
[1m[35m (0.1ms)[0m SELECT COUNT(*) total_ratings, COALESCE(SUM(value),0) rating_sum, COALESCE(AVG(value),0) rating_avg FROM ar_rates WHERE resource_type = 'Post' and resource_id = '109'
|
3953
|
-
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = 109 LIMIT 1[0m
|
3954
|
-
[1m[35m (0.1ms)[0m UPDATE "ar_ratings" SET "total" = 17, "average" = 3.058823529411764, "sum" = 52, "estimate" = 3.040934065934066, "updated_at" = '2013-05-23 20:08:10.262890' WHERE "ar_ratings"."id" = 83
|
3955
|
-
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post') rated_count, ((SELECT COUNT(*) from ar_rates WHERE resource_type = 'Post') / (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post')) avg_num_ratings FROM ar_rates WHERE resource_type = 'Post'[0m
|
3956
|
-
[1m[35m (0.8ms)[0m commit transaction
|
3957
|
-
[1m[36m (1.2ms)[0m [1mSELECT COUNT(DISTINCT "posts"."id") FROM "posts" LEFT OUTER JOIN "ar_ratings" ON "ar_ratings"."resource_id" = "posts"."id" AND "ar_ratings"."resource_type" = 'Post'[0m
|
3958
|
-
[1m[35m (0.1ms)[0m begin transaction
|
3959
|
-
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "Jeremie"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
3960
|
-
[1m[35m (0.6ms)[0m commit transaction
|
3961
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
3962
|
-
[1m[35mSQL (0.3ms)[0m INSERT INTO "posts" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?) [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "veniam fugit sequi excepturi porro"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
3963
|
-
[1m[36m (0.6ms)[0m [1mcommit transaction[0m
|
3964
|
-
[1m[35mActsRateable::Rate Load (0.1ms)[0m SELECT "ar_rates".* FROM "ar_rates" WHERE "ar_rates"."resource_type" = 'Post' AND "ar_rates"."resource_id" = 110 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."author_id" = 222 LIMIT 1
|
3965
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
3966
|
-
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = 222 LIMIT 1
|
3967
|
-
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = 110 LIMIT 1[0m
|
3968
|
-
[1m[35mActsRateable::Rate Exists (0.1ms)[0m SELECT 1 AS one FROM "ar_rates" WHERE ("ar_rates"."author_id" = 222 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."resource_id" = 110 AND "ar_rates"."resource_type" = 'Post') LIMIT 1
|
3969
|
-
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "ar_rates" ("author_id", "author_type", "created_at", "resource_id", "resource_type", "updated_at", "value") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["author_id", 222], ["author_type", "User"], ["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["resource_id", 110], ["resource_type", "Post"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", 3]]
|
3970
|
-
[1m[35mActsRateable::Rating Load (0.1ms)[0m SELECT "ar_ratings".* FROM "ar_ratings" WHERE "ar_ratings"."resource_type" = 'Post' AND "ar_ratings"."resource_id" = 110 LIMIT 1
|
3971
|
-
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) total_ratings, COALESCE(SUM(value),0) rating_sum, COALESCE(AVG(value),0) rating_avg FROM ar_rates WHERE resource_type = 'Post' and resource_id = '110'[0m
|
3972
|
-
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 110 LIMIT 1
|
3973
|
-
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "ar_ratings" ("average", "created_at", "estimate", "resource_id", "resource_type", "sum", "total", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["average", #<BigDecimal:7fb2b45cccb8,'0.3E1',9(45)>], ["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["estimate", #<BigDecimal:7fb2b45cc7b8,'0.2963114754 098361E1',27(45)>], ["resource_id", 110], ["resource_type", "Post"], ["sum", 3], ["total", 1], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00]]
|
3974
|
-
[1m[35m (0.4ms)[0m SELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post') rated_count, ((SELECT COUNT(*) from ar_rates WHERE resource_type = 'Post') / (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post')) avg_num_ratings FROM ar_rates WHERE resource_type = 'Post'
|
3975
|
-
[1m[36m (1.0ms)[0m [1mcommit transaction[0m
|
3976
|
-
[1m[35m (0.0ms)[0m begin transaction
|
3977
|
-
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "Adell"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
3978
|
-
[1m[35m (0.6ms)[0m commit transaction
|
3979
|
-
[1m[36mActsRateable::Rate Load (0.1ms)[0m [1mSELECT "ar_rates".* FROM "ar_rates" WHERE "ar_rates"."resource_type" = 'Post' AND "ar_rates"."resource_id" = 110 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."author_id" = 223 LIMIT 1[0m
|
3980
|
-
[1m[35m (0.0ms)[0m begin transaction
|
3981
|
-
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 223 LIMIT 1[0m
|
3982
|
-
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 110 LIMIT 1
|
3983
|
-
[1m[36mActsRateable::Rate Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "ar_rates" WHERE ("ar_rates"."author_id" = 223 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."resource_id" = 110 AND "ar_rates"."resource_type" = 'Post') LIMIT 1[0m
|
3984
|
-
[1m[35mSQL (0.3ms)[0m INSERT INTO "ar_rates" ("author_id", "author_type", "created_at", "resource_id", "resource_type", "updated_at", "value") VALUES (?, ?, ?, ?, ?, ?, ?) [["author_id", 223], ["author_type", "User"], ["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["resource_id", 110], ["resource_type", "Post"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", 5]]
|
3985
|
-
[1m[36mActsRateable::Rating Load (0.1ms)[0m [1mSELECT "ar_ratings".* FROM "ar_ratings" WHERE "ar_ratings"."resource_type" = 'Post' AND "ar_ratings"."resource_id" = 110 LIMIT 1[0m
|
3986
|
-
[1m[35m (0.1ms)[0m SELECT COUNT(*) total_ratings, COALESCE(SUM(value),0) rating_sum, COALESCE(AVG(value),0) rating_avg FROM ar_rates WHERE resource_type = 'Post' and resource_id = '110'
|
3987
|
-
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = 110 LIMIT 1[0m
|
3988
|
-
[1m[35m (0.1ms)[0m UPDATE "ar_ratings" SET "total" = 2, "average" = 4.0, "sum" = 8, "estimate" = 3.370652173913044, "updated_at" = '2013-05-23 20:08:10.298359' WHERE "ar_ratings"."id" = 84
|
3989
|
-
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post') rated_count, ((SELECT COUNT(*) from ar_rates WHERE resource_type = 'Post') / (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post')) avg_num_ratings FROM ar_rates WHERE resource_type = 'Post'[0m
|
3990
|
-
[1m[35m (0.9ms)[0m commit transaction
|
3991
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
3992
|
-
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?) [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "Korey"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
3993
|
-
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
3994
|
-
[1m[35mActsRateable::Rate Load (0.1ms)[0m SELECT "ar_rates".* FROM "ar_rates" WHERE "ar_rates"."resource_type" = 'Post' AND "ar_rates"."resource_id" = 110 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."author_id" = 224 LIMIT 1
|
3995
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
3996
|
-
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = 224 LIMIT 1
|
3997
|
-
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = 110 LIMIT 1[0m
|
3998
|
-
[1m[35mActsRateable::Rate Exists (0.1ms)[0m SELECT 1 AS one FROM "ar_rates" WHERE ("ar_rates"."author_id" = 224 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."resource_id" = 110 AND "ar_rates"."resource_type" = 'Post') LIMIT 1
|
3999
|
-
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "ar_rates" ("author_id", "author_type", "created_at", "resource_id", "resource_type", "updated_at", "value") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["author_id", 224], ["author_type", "User"], ["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["resource_id", 110], ["resource_type", "Post"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", 4]]
|
4000
|
-
[1m[35mActsRateable::Rating Load (0.1ms)[0m SELECT "ar_ratings".* FROM "ar_ratings" WHERE "ar_ratings"."resource_type" = 'Post' AND "ar_ratings"."resource_id" = 110 LIMIT 1
|
4001
|
-
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) total_ratings, COALESCE(SUM(value),0) rating_sum, COALESCE(AVG(value),0) rating_avg FROM ar_rates WHERE resource_type = 'Post' and resource_id = '110'[0m
|
4002
|
-
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 110 LIMIT 1
|
4003
|
-
[1m[36m (0.1ms)[0m [1mUPDATE "ar_ratings" SET "total" = 3, "sum" = 12, "estimate" = 3.481081081081081, "updated_at" = '2013-05-23 20:08:10.310259' WHERE "ar_ratings"."id" = 84[0m
|
4004
|
-
[1m[35m (0.5ms)[0m SELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post') rated_count, ((SELECT COUNT(*) from ar_rates WHERE resource_type = 'Post') / (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post')) avg_num_ratings FROM ar_rates WHERE resource_type = 'Post'
|
4005
|
-
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
4006
|
-
[1m[35m (0.0ms)[0m begin transaction
|
4007
|
-
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "Olen"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
4008
|
-
[1m[35m (0.9ms)[0m commit transaction
|
4009
|
-
[1m[36mActsRateable::Rate Load (0.1ms)[0m [1mSELECT "ar_rates".* FROM "ar_rates" WHERE "ar_rates"."resource_type" = 'Post' AND "ar_rates"."resource_id" = 110 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."author_id" = 225 LIMIT 1[0m
|
4010
|
-
[1m[35m (0.0ms)[0m begin transaction
|
4011
|
-
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 225 LIMIT 1[0m
|
4012
|
-
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 110 LIMIT 1
|
4013
|
-
[1m[36mActsRateable::Rate Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "ar_rates" WHERE ("ar_rates"."author_id" = 225 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."resource_id" = 110 AND "ar_rates"."resource_type" = 'Post') LIMIT 1[0m
|
4014
|
-
[1m[35mSQL (0.3ms)[0m INSERT INTO "ar_rates" ("author_id", "author_type", "created_at", "resource_id", "resource_type", "updated_at", "value") VALUES (?, ?, ?, ?, ?, ?, ?) [["author_id", 225], ["author_type", "User"], ["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["resource_id", 110], ["resource_type", "Post"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", 2]]
|
4015
|
-
[1m[36mActsRateable::Rating Load (0.1ms)[0m [1mSELECT "ar_ratings".* FROM "ar_ratings" WHERE "ar_ratings"."resource_type" = 'Post' AND "ar_ratings"."resource_id" = 110 LIMIT 1[0m
|
4016
|
-
[1m[35m (0.1ms)[0m SELECT COUNT(*) total_ratings, COALESCE(SUM(value),0) rating_sum, COALESCE(AVG(value),0) rating_avg FROM ar_rates WHERE resource_type = 'Post' and resource_id = '110'
|
4017
|
-
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = 110 LIMIT 1[0m
|
4018
|
-
[1m[35m (0.1ms)[0m UPDATE "ar_ratings" SET "total" = 4, "average" = 3.5, "sum" = 14, "estimate" = 3.271889400921659, "updated_at" = '2013-05-23 20:08:10.322195' WHERE "ar_ratings"."id" = 84
|
4019
|
-
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post') rated_count, ((SELECT COUNT(*) from ar_rates WHERE resource_type = 'Post') / (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post')) avg_num_ratings FROM ar_rates WHERE resource_type = 'Post'[0m
|
4020
|
-
[1m[35m (0.7ms)[0m commit transaction
|
4021
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
4022
|
-
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?) [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "Joanne"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
4023
|
-
[1m[36m (1.0ms)[0m [1mcommit transaction[0m
|
4024
|
-
[1m[35mActsRateable::Rate Load (0.1ms)[0m SELECT "ar_rates".* FROM "ar_rates" WHERE "ar_rates"."resource_type" = 'Post' AND "ar_rates"."resource_id" = 110 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."author_id" = 226 LIMIT 1
|
4025
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
4026
|
-
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = 226 LIMIT 1
|
4027
|
-
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = 110 LIMIT 1[0m
|
4028
|
-
[1m[35mActsRateable::Rate Exists (0.1ms)[0m SELECT 1 AS one FROM "ar_rates" WHERE ("ar_rates"."author_id" = 226 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."resource_id" = 110 AND "ar_rates"."resource_type" = 'Post') LIMIT 1
|
4029
|
-
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "ar_rates" ("author_id", "author_type", "created_at", "resource_id", "resource_type", "updated_at", "value") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["author_id", 226], ["author_type", "User"], ["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["resource_id", 110], ["resource_type", "Post"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", 5]]
|
4030
|
-
[1m[35mActsRateable::Rating Load (0.1ms)[0m SELECT "ar_ratings".* FROM "ar_ratings" WHERE "ar_ratings"."resource_type" = 'Post' AND "ar_ratings"."resource_id" = 110 LIMIT 1
|
4031
|
-
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) total_ratings, COALESCE(SUM(value),0) rating_sum, COALESCE(AVG(value),0) rating_avg FROM ar_rates WHERE resource_type = 'Post' and resource_id = '110'[0m
|
4032
|
-
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 110 LIMIT 1
|
4033
|
-
[1m[36m (0.1ms)[0m [1mUPDATE "ar_ratings" SET "total" = 5, "average" = 3.8, "sum" = 19, "estimate" = 3.48596256684492, "updated_at" = '2013-05-23 20:08:10.333907' WHERE "ar_ratings"."id" = 84[0m
|
4034
|
-
[1m[35m (0.4ms)[0m SELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post') rated_count, ((SELECT COUNT(*) from ar_rates WHERE resource_type = 'Post') / (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post')) avg_num_ratings FROM ar_rates WHERE resource_type = 'Post'
|
4035
|
-
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
4036
|
-
[1m[35m (0.0ms)[0m begin transaction
|
4037
|
-
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "Jannie"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
4038
|
-
[1m[35m (0.7ms)[0m commit transaction
|
4039
|
-
[1m[36mActsRateable::Rate Load (0.1ms)[0m [1mSELECT "ar_rates".* FROM "ar_rates" WHERE "ar_rates"."resource_type" = 'Post' AND "ar_rates"."resource_id" = 110 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."author_id" = 227 LIMIT 1[0m
|
4040
|
-
[1m[35m (0.0ms)[0m begin transaction
|
4041
|
-
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 227 LIMIT 1[0m
|
4042
|
-
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 110 LIMIT 1
|
4043
|
-
[1m[36mActsRateable::Rate Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "ar_rates" WHERE ("ar_rates"."author_id" = 227 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."resource_id" = 110 AND "ar_rates"."resource_type" = 'Post') LIMIT 1[0m
|
4044
|
-
[1m[35mSQL (0.4ms)[0m INSERT INTO "ar_rates" ("author_id", "author_type", "created_at", "resource_id", "resource_type", "updated_at", "value") VALUES (?, ?, ?, ?, ?, ?, ?) [["author_id", 227], ["author_type", "User"], ["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["resource_id", 110], ["resource_type", "Post"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", 3]]
|
4045
|
-
[1m[36mActsRateable::Rating Load (0.1ms)[0m [1mSELECT "ar_ratings".* FROM "ar_ratings" WHERE "ar_ratings"."resource_type" = 'Post' AND "ar_ratings"."resource_id" = 110 LIMIT 1[0m
|
4046
|
-
[1m[35m (0.1ms)[0m SELECT COUNT(*) total_ratings, COALESCE(SUM(value),0) rating_sum, COALESCE(AVG(value),0) rating_avg FROM ar_rates WHERE resource_type = 'Post' and resource_id = '110'
|
4047
|
-
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = 110 LIMIT 1[0m
|
4048
|
-
[1m[35m (0.1ms)[0m UPDATE "ar_ratings" SET "total" = 6, "average" = 3.666666666666667, "sum" = 22, "estimate" = 3.435579196217494, "updated_at" = '2013-05-23 20:08:10.345481' WHERE "ar_ratings"."id" = 84
|
4049
|
-
[1m[36m (0.5ms)[0m [1mSELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post') rated_count, ((SELECT COUNT(*) from ar_rates WHERE resource_type = 'Post') / (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post')) avg_num_ratings FROM ar_rates WHERE resource_type = 'Post'[0m
|
4050
|
-
[1m[35m (0.8ms)[0m commit transaction
|
4051
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
4052
|
-
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?) [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "Vernon"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
4053
|
-
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
4054
|
-
[1m[35mActsRateable::Rate Load (0.1ms)[0m SELECT "ar_rates".* FROM "ar_rates" WHERE "ar_rates"."resource_type" = 'Post' AND "ar_rates"."resource_id" = 110 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."author_id" = 228 LIMIT 1
|
4055
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
4056
|
-
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = 228 LIMIT 1
|
4057
|
-
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = 110 LIMIT 1[0m
|
4058
|
-
[1m[35mActsRateable::Rate Exists (0.1ms)[0m SELECT 1 AS one FROM "ar_rates" WHERE ("ar_rates"."author_id" = 228 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."resource_id" = 110 AND "ar_rates"."resource_type" = 'Post') LIMIT 1
|
4059
|
-
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "ar_rates" ("author_id", "author_type", "created_at", "resource_id", "resource_type", "updated_at", "value") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["author_id", 228], ["author_type", "User"], ["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["resource_id", 110], ["resource_type", "Post"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", 4]]
|
4060
|
-
[1m[35mActsRateable::Rating Load (0.1ms)[0m SELECT "ar_ratings".* FROM "ar_ratings" WHERE "ar_ratings"."resource_type" = 'Post' AND "ar_ratings"."resource_id" = 110 LIMIT 1
|
4061
|
-
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) total_ratings, COALESCE(SUM(value),0) rating_sum, COALESCE(AVG(value),0) rating_avg FROM ar_rates WHERE resource_type = 'Post' and resource_id = '110'[0m
|
4062
|
-
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 110 LIMIT 1
|
4063
|
-
[1m[36m (0.1ms)[0m [1mUPDATE "ar_ratings" SET "total" = 7, "average" = 3.714285714285714, "sum" = 26, "estimate" = 3.492063492063492, "updated_at" = '2013-05-23 20:08:10.356906' WHERE "ar_ratings"."id" = 84[0m
|
4064
|
-
[1m[35m (0.4ms)[0m SELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post') rated_count, ((SELECT COUNT(*) from ar_rates WHERE resource_type = 'Post') / (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post')) avg_num_ratings FROM ar_rates WHERE resource_type = 'Post'
|
4065
|
-
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
4066
|
-
[1m[35m (0.4ms)[0m begin transaction
|
4067
|
-
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "Ignacio"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
4068
|
-
[1m[35m (0.9ms)[0m commit transaction
|
4069
|
-
[1m[36mActsRateable::Rate Load (0.1ms)[0m [1mSELECT "ar_rates".* FROM "ar_rates" WHERE "ar_rates"."resource_type" = 'Post' AND "ar_rates"."resource_id" = 110 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."author_id" = 229 LIMIT 1[0m
|
4070
|
-
[1m[35m (0.0ms)[0m begin transaction
|
4071
|
-
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 229 LIMIT 1[0m
|
4072
|
-
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 110 LIMIT 1
|
4073
|
-
[1m[36mActsRateable::Rate Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "ar_rates" WHERE ("ar_rates"."author_id" = 229 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."resource_id" = 110 AND "ar_rates"."resource_type" = 'Post') LIMIT 1[0m
|
4074
|
-
[1m[35mSQL (0.4ms)[0m INSERT INTO "ar_rates" ("author_id", "author_type", "created_at", "resource_id", "resource_type", "updated_at", "value") VALUES (?, ?, ?, ?, ?, ?, ?) [["author_id", 229], ["author_type", "User"], ["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["resource_id", 110], ["resource_type", "Post"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", 5]]
|
4075
|
-
[1m[36mActsRateable::Rating Load (0.1ms)[0m [1mSELECT "ar_ratings".* FROM "ar_ratings" WHERE "ar_ratings"."resource_type" = 'Post' AND "ar_ratings"."resource_id" = 110 LIMIT 1[0m
|
4076
|
-
[1m[35m (0.1ms)[0m SELECT COUNT(*) total_ratings, COALESCE(SUM(value),0) rating_sum, COALESCE(AVG(value),0) rating_avg FROM ar_rates WHERE resource_type = 'Post' and resource_id = '110'
|
4077
|
-
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = 110 LIMIT 1[0m
|
4078
|
-
[1m[35m (0.1ms)[0m UPDATE "ar_ratings" SET "total" = 8, "average" = 3.875, "sum" = 31, "estimate" = 3.630622009569378, "updated_at" = '2013-05-23 20:08:10.368656' WHERE "ar_ratings"."id" = 84
|
4079
|
-
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post') rated_count, ((SELECT COUNT(*) from ar_rates WHERE resource_type = 'Post') / (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post')) avg_num_ratings FROM ar_rates WHERE resource_type = 'Post'[0m
|
4080
|
-
[1m[35m (0.7ms)[0m commit transaction
|
4081
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
4082
|
-
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?) [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "Jesse"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
4083
|
-
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
4084
|
-
[1m[35mActsRateable::Rate Load (0.1ms)[0m SELECT "ar_rates".* FROM "ar_rates" WHERE "ar_rates"."resource_type" = 'Post' AND "ar_rates"."resource_id" = 110 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."author_id" = 230 LIMIT 1
|
4085
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
4086
|
-
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = 230 LIMIT 1
|
4087
|
-
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = 110 LIMIT 1[0m
|
4088
|
-
[1m[35mActsRateable::Rate Exists (0.1ms)[0m SELECT 1 AS one FROM "ar_rates" WHERE ("ar_rates"."author_id" = 230 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."resource_id" = 110 AND "ar_rates"."resource_type" = 'Post') LIMIT 1
|
4089
|
-
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "ar_rates" ("author_id", "author_type", "created_at", "resource_id", "resource_type", "updated_at", "value") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["author_id", 230], ["author_type", "User"], ["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["resource_id", 110], ["resource_type", "Post"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", 1]]
|
4090
|
-
[1m[35mActsRateable::Rating Load (0.1ms)[0m SELECT "ar_ratings".* FROM "ar_ratings" WHERE "ar_ratings"."resource_type" = 'Post' AND "ar_ratings"."resource_id" = 110 LIMIT 1
|
4091
|
-
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) total_ratings, COALESCE(SUM(value),0) rating_sum, COALESCE(AVG(value),0) rating_avg FROM ar_rates WHERE resource_type = 'Post' and resource_id = '110'[0m
|
4092
|
-
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 110 LIMIT 1
|
4093
|
-
[1m[36m (0.1ms)[0m [1mUPDATE "ar_ratings" SET "total" = 9, "average" = 3.555555555555555, "sum" = 32, "estimate" = 3.414048865619546, "updated_at" = '2013-05-23 20:08:10.380033' WHERE "ar_ratings"."id" = 84[0m
|
4094
|
-
[1m[35m (0.4ms)[0m SELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post') rated_count, ((SELECT COUNT(*) from ar_rates WHERE resource_type = 'Post') / (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post')) avg_num_ratings FROM ar_rates WHERE resource_type = 'Post'
|
4095
|
-
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
4096
|
-
[1m[35m (0.0ms)[0m begin transaction
|
4097
|
-
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "Myrl"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
4098
|
-
[1m[35m (0.8ms)[0m commit transaction
|
4099
|
-
[1m[36mActsRateable::Rate Load (0.1ms)[0m [1mSELECT "ar_rates".* FROM "ar_rates" WHERE "ar_rates"."resource_type" = 'Post' AND "ar_rates"."resource_id" = 110 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."author_id" = 231 LIMIT 1[0m
|
4100
|
-
[1m[35m (0.0ms)[0m begin transaction
|
4101
|
-
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 231 LIMIT 1[0m
|
4102
|
-
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 110 LIMIT 1
|
4103
|
-
[1m[36mActsRateable::Rate Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "ar_rates" WHERE ("ar_rates"."author_id" = 231 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."resource_id" = 110 AND "ar_rates"."resource_type" = 'Post') LIMIT 1[0m
|
4104
|
-
[1m[35mSQL (0.3ms)[0m INSERT INTO "ar_rates" ("author_id", "author_type", "created_at", "resource_id", "resource_type", "updated_at", "value") VALUES (?, ?, ?, ?, ?, ?, ?) [["author_id", 231], ["author_type", "User"], ["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["resource_id", 110], ["resource_type", "Post"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", 2]]
|
4105
|
-
[1m[36mActsRateable::Rating Load (0.1ms)[0m [1mSELECT "ar_ratings".* FROM "ar_ratings" WHERE "ar_ratings"."resource_type" = 'Post' AND "ar_ratings"."resource_id" = 110 LIMIT 1[0m
|
4106
|
-
[1m[35m (0.1ms)[0m SELECT COUNT(*) total_ratings, COALESCE(SUM(value),0) rating_sum, COALESCE(AVG(value),0) rating_avg FROM ar_rates WHERE resource_type = 'Post' and resource_id = '110'
|
4107
|
-
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = 110 LIMIT 1[0m
|
4108
|
-
[1m[35m (0.1ms)[0m UPDATE "ar_ratings" SET "total" = 10, "average" = 3.4, "sum" = 34, "estimate" = 3.302884615384615, "updated_at" = '2013-05-23 20:08:10.391536' WHERE "ar_ratings"."id" = 84
|
4109
|
-
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post') rated_count, ((SELECT COUNT(*) from ar_rates WHERE resource_type = 'Post') / (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post')) avg_num_ratings FROM ar_rates WHERE resource_type = 'Post'[0m
|
4110
|
-
[1m[35m (0.9ms)[0m commit transaction
|
4111
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
4112
|
-
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?) [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "Rupert"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
4113
|
-
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
4114
|
-
[1m[35mActsRateable::Rate Load (0.1ms)[0m SELECT "ar_rates".* FROM "ar_rates" WHERE "ar_rates"."resource_type" = 'Post' AND "ar_rates"."resource_id" = 110 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."author_id" = 232 LIMIT 1
|
4115
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
4116
|
-
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = 232 LIMIT 1
|
4117
|
-
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = 110 LIMIT 1[0m
|
4118
|
-
[1m[35mActsRateable::Rate Exists (0.1ms)[0m SELECT 1 AS one FROM "ar_rates" WHERE ("ar_rates"."author_id" = 232 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."resource_id" = 110 AND "ar_rates"."resource_type" = 'Post') LIMIT 1
|
4119
|
-
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "ar_rates" ("author_id", "author_type", "created_at", "resource_id", "resource_type", "updated_at", "value") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["author_id", 232], ["author_type", "User"], ["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["resource_id", 110], ["resource_type", "Post"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", 5]]
|
4120
|
-
[1m[35mActsRateable::Rating Load (0.1ms)[0m SELECT "ar_ratings".* FROM "ar_ratings" WHERE "ar_ratings"."resource_type" = 'Post' AND "ar_ratings"."resource_id" = 110 LIMIT 1
|
4121
|
-
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) total_ratings, COALESCE(SUM(value),0) rating_sum, COALESCE(AVG(value),0) rating_avg FROM ar_rates WHERE resource_type = 'Post' and resource_id = '110'[0m
|
4122
|
-
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 110 LIMIT 1
|
4123
|
-
[1m[36m (0.1ms)[0m [1mUPDATE "ar_ratings" SET "total" = 11, "average" = 3.545454545454545, "sum" = 39, "estimate" = 3.423019985196151, "updated_at" = '2013-05-23 20:08:10.402981' WHERE "ar_ratings"."id" = 84[0m
|
4124
|
-
[1m[35m (0.4ms)[0m SELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post') rated_count, ((SELECT COUNT(*) from ar_rates WHERE resource_type = 'Post') / (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post')) avg_num_ratings FROM ar_rates WHERE resource_type = 'Post'
|
4125
|
-
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
4126
|
-
[1m[35m (0.0ms)[0m begin transaction
|
4127
|
-
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "Lambert"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
4128
|
-
[1m[35m (0.9ms)[0m commit transaction
|
4129
|
-
[1m[36mActsRateable::Rate Load (0.1ms)[0m [1mSELECT "ar_rates".* FROM "ar_rates" WHERE "ar_rates"."resource_type" = 'Post' AND "ar_rates"."resource_id" = 110 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."author_id" = 233 LIMIT 1[0m
|
4130
|
-
[1m[35m (0.0ms)[0m begin transaction
|
4131
|
-
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 233 LIMIT 1[0m
|
4132
|
-
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 110 LIMIT 1
|
4133
|
-
[1m[36mActsRateable::Rate Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "ar_rates" WHERE ("ar_rates"."author_id" = 233 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."resource_id" = 110 AND "ar_rates"."resource_type" = 'Post') LIMIT 1[0m
|
4134
|
-
[1m[35mSQL (0.3ms)[0m INSERT INTO "ar_rates" ("author_id", "author_type", "created_at", "resource_id", "resource_type", "updated_at", "value") VALUES (?, ?, ?, ?, ?, ?, ?) [["author_id", 233], ["author_type", "User"], ["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["resource_id", 110], ["resource_type", "Post"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", 4]]
|
4135
|
-
[1m[36mActsRateable::Rating Load (0.1ms)[0m [1mSELECT "ar_ratings".* FROM "ar_ratings" WHERE "ar_ratings"."resource_type" = 'Post' AND "ar_ratings"."resource_id" = 110 LIMIT 1[0m
|
4136
|
-
[1m[35m (0.1ms)[0m SELECT COUNT(*) total_ratings, COALESCE(SUM(value),0) rating_sum, COALESCE(AVG(value),0) rating_avg FROM ar_rates WHERE resource_type = 'Post' and resource_id = '110'
|
4137
|
-
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = 110 LIMIT 1[0m
|
4138
|
-
[1m[35m (0.1ms)[0m UPDATE "ar_ratings" SET "total" = 12, "average" = 3.583333333333333, "sum" = 43, "estimate" = 3.463573883161513, "updated_at" = '2013-05-23 20:08:10.414349' WHERE "ar_ratings"."id" = 84
|
4139
|
-
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post') rated_count, ((SELECT COUNT(*) from ar_rates WHERE resource_type = 'Post') / (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post')) avg_num_ratings FROM ar_rates WHERE resource_type = 'Post'[0m
|
4140
|
-
[1m[35m (0.6ms)[0m commit transaction
|
4141
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
4142
|
-
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?) [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "Moriah"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
4143
|
-
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
4144
|
-
[1m[35mActsRateable::Rate Load (0.1ms)[0m SELECT "ar_rates".* FROM "ar_rates" WHERE "ar_rates"."resource_type" = 'Post' AND "ar_rates"."resource_id" = 110 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."author_id" = 234 LIMIT 1
|
4145
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
4146
|
-
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = 234 LIMIT 1
|
4147
|
-
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = 110 LIMIT 1[0m
|
4148
|
-
[1m[35mActsRateable::Rate Exists (0.1ms)[0m SELECT 1 AS one FROM "ar_rates" WHERE ("ar_rates"."author_id" = 234 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."resource_id" = 110 AND "ar_rates"."resource_type" = 'Post') LIMIT 1
|
4149
|
-
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "ar_rates" ("author_id", "author_type", "created_at", "resource_id", "resource_type", "updated_at", "value") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["author_id", 234], ["author_type", "User"], ["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["resource_id", 110], ["resource_type", "Post"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", 4]]
|
4150
|
-
[1m[35mActsRateable::Rating Load (0.1ms)[0m SELECT "ar_ratings".* FROM "ar_ratings" WHERE "ar_ratings"."resource_type" = 'Post' AND "ar_ratings"."resource_id" = 110 LIMIT 1
|
4151
|
-
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) total_ratings, COALESCE(SUM(value),0) rating_sum, COALESCE(AVG(value),0) rating_avg FROM ar_rates WHERE resource_type = 'Post' and resource_id = '110'[0m
|
4152
|
-
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 110 LIMIT 1
|
4153
|
-
[1m[36m (0.1ms)[0m [1mUPDATE "ar_ratings" SET "total" = 13, "average" = 3.615384615384615, "sum" = 47, "estimate" = 3.498076923076923, "updated_at" = '2013-05-23 20:08:10.426058' WHERE "ar_ratings"."id" = 84[0m
|
4154
|
-
[1m[35m (0.4ms)[0m SELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post') rated_count, ((SELECT COUNT(*) from ar_rates WHERE resource_type = 'Post') / (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post')) avg_num_ratings FROM ar_rates WHERE resource_type = 'Post'
|
4155
|
-
[1m[36m (0.6ms)[0m [1mcommit transaction[0m
|
4156
|
-
[1m[35m (0.0ms)[0m begin transaction
|
4157
|
-
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "Merl"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
4158
|
-
[1m[35m (0.8ms)[0m commit transaction
|
4159
|
-
[1m[36mActsRateable::Rate Load (0.1ms)[0m [1mSELECT "ar_rates".* FROM "ar_rates" WHERE "ar_rates"."resource_type" = 'Post' AND "ar_rates"."resource_id" = 110 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."author_id" = 235 LIMIT 1[0m
|
4160
|
-
[1m[35m (0.0ms)[0m begin transaction
|
4161
|
-
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 235 LIMIT 1[0m
|
4162
|
-
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 110 LIMIT 1
|
4163
|
-
[1m[36mActsRateable::Rate Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "ar_rates" WHERE ("ar_rates"."author_id" = 235 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."resource_id" = 110 AND "ar_rates"."resource_type" = 'Post') LIMIT 1[0m
|
4164
|
-
[1m[35mSQL (0.3ms)[0m INSERT INTO "ar_rates" ("author_id", "author_type", "created_at", "resource_id", "resource_type", "updated_at", "value") VALUES (?, ?, ?, ?, ?, ?, ?) [["author_id", 235], ["author_type", "User"], ["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["resource_id", 110], ["resource_type", "Post"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", 5]]
|
4165
|
-
[1m[36mActsRateable::Rating Load (0.1ms)[0m [1mSELECT "ar_ratings".* FROM "ar_ratings" WHERE "ar_ratings"."resource_type" = 'Post' AND "ar_ratings"."resource_id" = 110 LIMIT 1[0m
|
4166
|
-
[1m[35m (0.1ms)[0m SELECT COUNT(*) total_ratings, COALESCE(SUM(value),0) rating_sum, COALESCE(AVG(value),0) rating_avg FROM ar_rates WHERE resource_type = 'Post' and resource_id = '110'
|
4167
|
-
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = 110 LIMIT 1[0m
|
4168
|
-
[1m[35m (0.1ms)[0m UPDATE "ar_ratings" SET "total" = 14, "average" = 3.714285714285714, "sum" = 52, "estimate" = 3.587334933973589, "updated_at" = '2013-05-23 20:08:10.437198' WHERE "ar_ratings"."id" = 84
|
4169
|
-
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post') rated_count, ((SELECT COUNT(*) from ar_rates WHERE resource_type = 'Post') / (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post')) avg_num_ratings FROM ar_rates WHERE resource_type = 'Post'[0m
|
4170
|
-
[1m[35m (0.9ms)[0m commit transaction
|
4171
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
4172
|
-
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?) [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "Lina"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
4173
|
-
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
4174
|
-
[1m[35mActsRateable::Rate Load (0.1ms)[0m SELECT "ar_rates".* FROM "ar_rates" WHERE "ar_rates"."resource_type" = 'Post' AND "ar_rates"."resource_id" = 110 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."author_id" = 236 LIMIT 1
|
4175
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
4176
|
-
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = 236 LIMIT 1
|
4177
|
-
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = 110 LIMIT 1[0m
|
4178
|
-
[1m[35mActsRateable::Rate Exists (0.1ms)[0m SELECT 1 AS one FROM "ar_rates" WHERE ("ar_rates"."author_id" = 236 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."resource_id" = 110 AND "ar_rates"."resource_type" = 'Post') LIMIT 1
|
4179
|
-
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "ar_rates" ("author_id", "author_type", "created_at", "resource_id", "resource_type", "updated_at", "value") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["author_id", 236], ["author_type", "User"], ["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["resource_id", 110], ["resource_type", "Post"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", 5]]
|
4180
|
-
[1m[35mActsRateable::Rating Load (0.1ms)[0m SELECT "ar_ratings".* FROM "ar_ratings" WHERE "ar_ratings"."resource_type" = 'Post' AND "ar_ratings"."resource_id" = 110 LIMIT 1
|
4181
|
-
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) total_ratings, COALESCE(SUM(value),0) rating_sum, COALESCE(AVG(value),0) rating_avg FROM ar_rates WHERE resource_type = 'Post' and resource_id = '110'[0m
|
4182
|
-
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 110 LIMIT 1
|
4183
|
-
[1m[36m (0.1ms)[0m [1mUPDATE "ar_ratings" SET "total" = 15, "average" = 3.8, "sum" = 57, "estimate" = 3.66751269035533, "updated_at" = '2013-05-23 20:08:10.448694' WHERE "ar_ratings"."id" = 84[0m
|
4184
|
-
[1m[35m (0.5ms)[0m SELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post') rated_count, ((SELECT COUNT(*) from ar_rates WHERE resource_type = 'Post') / (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post')) avg_num_ratings FROM ar_rates WHERE resource_type = 'Post'
|
4185
|
-
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
4186
|
-
[1m[35m (0.0ms)[0m begin transaction
|
4187
|
-
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "Michel"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
4188
|
-
[1m[35m (0.8ms)[0m commit transaction
|
4189
|
-
[1m[36mActsRateable::Rate Load (0.1ms)[0m [1mSELECT "ar_rates".* FROM "ar_rates" WHERE "ar_rates"."resource_type" = 'Post' AND "ar_rates"."resource_id" = 110 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."author_id" = 237 LIMIT 1[0m
|
4190
|
-
[1m[35m (0.0ms)[0m begin transaction
|
4191
|
-
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 237 LIMIT 1[0m
|
4192
|
-
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 110 LIMIT 1
|
4193
|
-
[1m[36mActsRateable::Rate Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "ar_rates" WHERE ("ar_rates"."author_id" = 237 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."resource_id" = 110 AND "ar_rates"."resource_type" = 'Post') LIMIT 1[0m
|
4194
|
-
[1m[35mSQL (0.4ms)[0m INSERT INTO "ar_rates" ("author_id", "author_type", "created_at", "resource_id", "resource_type", "updated_at", "value") VALUES (?, ?, ?, ?, ?, ?, ?) [["author_id", 237], ["author_type", "User"], ["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["resource_id", 110], ["resource_type", "Post"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", 4]]
|
4195
|
-
[1m[36mActsRateable::Rating Load (0.1ms)[0m [1mSELECT "ar_ratings".* FROM "ar_ratings" WHERE "ar_ratings"."resource_type" = 'Post' AND "ar_ratings"."resource_id" = 110 LIMIT 1[0m
|
4196
|
-
[1m[35m (0.1ms)[0m SELECT COUNT(*) total_ratings, COALESCE(SUM(value),0) rating_sum, COALESCE(AVG(value),0) rating_avg FROM ar_rates WHERE resource_type = 'Post' and resource_id = '110'
|
4197
|
-
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = 110 LIMIT 1[0m
|
4198
|
-
[1m[35m (0.1ms)[0m UPDATE "ar_ratings" SET "total" = 16, "average" = 3.8125, "sum" = 61, "estimate" = 3.686602870813397, "updated_at" = '2013-05-23 20:08:10.460342' WHERE "ar_ratings"."id" = 84
|
4199
|
-
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post') rated_count, ((SELECT COUNT(*) from ar_rates WHERE resource_type = 'Post') / (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post')) avg_num_ratings FROM ar_rates WHERE resource_type = 'Post'[0m
|
4200
|
-
[1m[35m (0.9ms)[0m commit transaction
|
4201
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
4202
|
-
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?) [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "Quinton"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
4203
|
-
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
4204
|
-
[1m[35mActsRateable::Rate Load (0.1ms)[0m SELECT "ar_rates".* FROM "ar_rates" WHERE "ar_rates"."resource_type" = 'Post' AND "ar_rates"."resource_id" = 110 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."author_id" = 238 LIMIT 1
|
4205
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
4206
|
-
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = 238 LIMIT 1
|
4207
|
-
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = 110 LIMIT 1[0m
|
4208
|
-
[1m[35mActsRateable::Rate Exists (0.1ms)[0m SELECT 1 AS one FROM "ar_rates" WHERE ("ar_rates"."author_id" = 238 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."resource_id" = 110 AND "ar_rates"."resource_type" = 'Post') LIMIT 1
|
4209
|
-
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "ar_rates" ("author_id", "author_type", "created_at", "resource_id", "resource_type", "updated_at", "value") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["author_id", 238], ["author_type", "User"], ["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["resource_id", 110], ["resource_type", "Post"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", 5]]
|
4210
|
-
[1m[35mActsRateable::Rating Load (0.1ms)[0m SELECT "ar_ratings".* FROM "ar_ratings" WHERE "ar_ratings"."resource_type" = 'Post' AND "ar_ratings"."resource_id" = 110 LIMIT 1
|
4211
|
-
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) total_ratings, COALESCE(SUM(value),0) rating_sum, COALESCE(AVG(value),0) rating_avg FROM ar_rates WHERE resource_type = 'Post' and resource_id = '110'[0m
|
4212
|
-
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 110 LIMIT 1
|
4213
|
-
[1m[36m (0.1ms)[0m [1mUPDATE "ar_ratings" SET "total" = 17, "average" = 3.882352941176471, "sum" = 66, "estimate" = 3.753015075376884, "updated_at" = '2013-05-23 20:08:10.471807' WHERE "ar_ratings"."id" = 84[0m
|
4214
|
-
[1m[35m (0.5ms)[0m SELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post') rated_count, ((SELECT COUNT(*) from ar_rates WHERE resource_type = 'Post') / (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post')) avg_num_ratings FROM ar_rates WHERE resource_type = 'Post'
|
4215
|
-
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
4216
|
-
[1m[35m (0.0ms)[0m begin transaction
|
4217
|
-
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "Jana"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
4218
|
-
[1m[35m (0.9ms)[0m commit transaction
|
4219
|
-
[1m[36mActsRateable::Rate Load (0.1ms)[0m [1mSELECT "ar_rates".* FROM "ar_rates" WHERE "ar_rates"."resource_type" = 'Post' AND "ar_rates"."resource_id" = 110 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."author_id" = 239 LIMIT 1[0m
|
4220
|
-
[1m[35m (0.0ms)[0m begin transaction
|
4221
|
-
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 239 LIMIT 1[0m
|
4222
|
-
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 110 LIMIT 1
|
4223
|
-
[1m[36mActsRateable::Rate Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "ar_rates" WHERE ("ar_rates"."author_id" = 239 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."resource_id" = 110 AND "ar_rates"."resource_type" = 'Post') LIMIT 1[0m
|
4224
|
-
[1m[35mSQL (0.4ms)[0m INSERT INTO "ar_rates" ("author_id", "author_type", "created_at", "resource_id", "resource_type", "updated_at", "value") VALUES (?, ?, ?, ?, ?, ?, ?) [["author_id", 239], ["author_type", "User"], ["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["resource_id", 110], ["resource_type", "Post"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", 2]]
|
4225
|
-
[1m[36mActsRateable::Rating Load (0.1ms)[0m [1mSELECT "ar_ratings".* FROM "ar_ratings" WHERE "ar_ratings"."resource_type" = 'Post' AND "ar_ratings"."resource_id" = 110 LIMIT 1[0m
|
4226
|
-
[1m[35m (0.1ms)[0m SELECT COUNT(*) total_ratings, COALESCE(SUM(value),0) rating_sum, COALESCE(AVG(value),0) rating_avg FROM ar_rates WHERE resource_type = 'Post' and resource_id = '110'
|
4227
|
-
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = 110 LIMIT 1[0m
|
4228
|
-
[1m[35m (0.1ms)[0m UPDATE "ar_ratings" SET "total" = 18, "average" = 3.777777777777778, "sum" = 68, "estimate" = 3.670952380952381, "updated_at" = '2013-05-23 20:08:10.483499' WHERE "ar_ratings"."id" = 84
|
4229
|
-
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post') rated_count, ((SELECT COUNT(*) from ar_rates WHERE resource_type = 'Post') / (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post')) avg_num_ratings FROM ar_rates WHERE resource_type = 'Post'[0m
|
4230
|
-
[1m[35m (0.8ms)[0m commit transaction
|
4231
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
4232
|
-
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?) [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "Annamae"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
4233
|
-
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
4234
|
-
[1m[35mActsRateable::Rate Load (0.1ms)[0m SELECT "ar_rates".* FROM "ar_rates" WHERE "ar_rates"."resource_type" = 'Post' AND "ar_rates"."resource_id" = 110 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."author_id" = 240 LIMIT 1
|
4235
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
4236
|
-
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = 240 LIMIT 1
|
4237
|
-
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = 110 LIMIT 1[0m
|
4238
|
-
[1m[35mActsRateable::Rate Exists (0.1ms)[0m SELECT 1 AS one FROM "ar_rates" WHERE ("ar_rates"."author_id" = 240 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."resource_id" = 110 AND "ar_rates"."resource_type" = 'Post') LIMIT 1
|
4239
|
-
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "ar_rates" ("author_id", "author_type", "created_at", "resource_id", "resource_type", "updated_at", "value") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["author_id", 240], ["author_type", "User"], ["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["resource_id", 110], ["resource_type", "Post"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", 2]]
|
4240
|
-
[1m[35mActsRateable::Rating Load (0.1ms)[0m SELECT "ar_ratings".* FROM "ar_ratings" WHERE "ar_ratings"."resource_type" = 'Post' AND "ar_ratings"."resource_id" = 110 LIMIT 1
|
4241
|
-
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) total_ratings, COALESCE(SUM(value),0) rating_sum, COALESCE(AVG(value),0) rating_avg FROM ar_rates WHERE resource_type = 'Post' and resource_id = '110'[0m
|
4242
|
-
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 110 LIMIT 1
|
4243
|
-
[1m[36m (0.1ms)[0m [1mUPDATE "ar_ratings" SET "total" = 19, "average" = 3.684210526315789, "sum" = 70, "estimate" = 3.594301221166893, "updated_at" = '2013-05-23 20:08:10.494963' WHERE "ar_ratings"."id" = 84[0m
|
4244
|
-
[1m[35m (0.4ms)[0m SELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post') rated_count, ((SELECT COUNT(*) from ar_rates WHERE resource_type = 'Post') / (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post')) avg_num_ratings FROM ar_rates WHERE resource_type = 'Post'
|
4245
|
-
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
4246
|
-
[1m[35m (0.0ms)[0m begin transaction
|
4247
|
-
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "Waylon"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
4248
|
-
[1m[35m (0.8ms)[0m commit transaction
|
4249
|
-
[1m[36mActsRateable::Rate Load (0.1ms)[0m [1mSELECT "ar_rates".* FROM "ar_rates" WHERE "ar_rates"."resource_type" = 'Post' AND "ar_rates"."resource_id" = 110 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."author_id" = 241 LIMIT 1[0m
|
4250
|
-
[1m[35m (0.0ms)[0m begin transaction
|
4251
|
-
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 241 LIMIT 1[0m
|
4252
|
-
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 110 LIMIT 1
|
4253
|
-
[1m[36mActsRateable::Rate Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "ar_rates" WHERE ("ar_rates"."author_id" = 241 AND "ar_rates"."author_type" = 'User' AND "ar_rates"."resource_id" = 110 AND "ar_rates"."resource_type" = 'Post') LIMIT 1[0m
|
4254
|
-
[1m[35mSQL (0.3ms)[0m INSERT INTO "ar_rates" ("author_id", "author_type", "created_at", "resource_id", "resource_type", "updated_at", "value") VALUES (?, ?, ?, ?, ?, ?, ?) [["author_id", 241], ["author_type", "User"], ["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["resource_id", 110], ["resource_type", "Post"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", 4]]
|
4255
|
-
[1m[36mActsRateable::Rating Load (0.1ms)[0m [1mSELECT "ar_ratings".* FROM "ar_ratings" WHERE "ar_ratings"."resource_type" = 'Post' AND "ar_ratings"."resource_id" = 110 LIMIT 1[0m
|
4256
|
-
[1m[35m (0.1ms)[0m SELECT COUNT(*) total_ratings, COALESCE(SUM(value),0) rating_sum, COALESCE(AVG(value),0) rating_avg FROM ar_rates WHERE resource_type = 'Post' and resource_id = '110'
|
4257
|
-
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = 110 LIMIT 1[0m
|
4258
|
-
[1m[35m (0.1ms)[0m UPDATE "ar_ratings" SET "total" = 20, "average" = 3.7, "sum" = 74, "estimate" = 3.611278519156263, "updated_at" = '2013-05-23 20:08:10.506287' WHERE "ar_ratings"."id" = 84
|
4259
|
-
[1m[36m (0.5ms)[0m [1mSELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post') rated_count, ((SELECT COUNT(*) from ar_rates WHERE resource_type = 'Post') / (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'Post')) avg_num_ratings FROM ar_rates WHERE resource_type = 'Post'[0m
|
4260
|
-
[1m[35m (0.9ms)[0m commit transaction
|
4261
|
-
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "ar_ratings" [0m
|
4262
|
-
[1m[35m (0.0ms)[0m begin transaction
|
4263
|
-
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "posts" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "consectetur nam modi possimus ipsa"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
4264
|
-
[1m[35m (0.6ms)[0m commit transaction
|
4265
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
4266
|
-
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?) [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "Christophe"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
4267
|
-
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
4268
|
-
[1m[35mActsRateable::Rate Load (0.1ms)[0m SELECT "ar_rates".* FROM "ar_rates" WHERE "ar_rates"."resource_type" = 'User' AND "ar_rates"."resource_id" = 242 AND "ar_rates"."author_type" = 'Post' AND "ar_rates"."author_id" = 111 LIMIT 1
|
4269
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
4270
|
-
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 111 LIMIT 1
|
4271
|
-
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 242 LIMIT 1[0m
|
4272
|
-
[1m[35mActsRateable::Rate Exists (0.1ms)[0m SELECT 1 AS one FROM "ar_rates" WHERE ("ar_rates"."author_id" = 111 AND "ar_rates"."author_type" = 'Post' AND "ar_rates"."resource_id" = 242 AND "ar_rates"."resource_type" = 'User') LIMIT 1
|
4273
|
-
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "ar_rates" ("author_id", "author_type", "created_at", "resource_id", "resource_type", "updated_at", "value") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["author_id", 111], ["author_type", "Post"], ["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["resource_id", 242], ["resource_type", "User"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", 4]]
|
4274
|
-
[1m[35mActsRateable::Rating Load (0.1ms)[0m SELECT "ar_ratings".* FROM "ar_ratings" WHERE "ar_ratings"."resource_type" = 'User' AND "ar_ratings"."resource_id" = 242 LIMIT 1
|
4275
|
-
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) total_ratings, COALESCE(SUM(value),0) rating_sum, COALESCE(AVG(value),0) rating_avg FROM ar_rates WHERE resource_type = 'User' and resource_id = '242'[0m
|
4276
|
-
[1m[35m (0.4ms)[0m SELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'User') rated_count, ((SELECT COUNT(*) from ar_rates WHERE resource_type = 'User') / (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'User')) avg_num_ratings FROM ar_rates WHERE resource_type = 'User'
|
4277
|
-
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 242 LIMIT 1[0m
|
4278
|
-
[1m[35mSQL (0.2ms)[0m INSERT INTO "ar_ratings" ("average", "created_at", "estimate", "resource_id", "resource_type", "sum", "total", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["average", #<BigDecimal:7fb2b7544f40,'0.4E1',9(45)>], ["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["estimate", #<BigDecimal:7fb2b7544d88,'0.4E1',9(45)>], ["resource_id", 242], ["resource_type", "User"], ["sum", 4], ["total", 1], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00]]
|
4279
|
-
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'User') rated_count, ((SELECT COUNT(*) from ar_rates WHERE resource_type = 'User') / (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'User')) avg_num_ratings FROM ar_rates WHERE resource_type = 'User'[0m
|
4280
|
-
[1m[35m (1.0ms)[0m commit transaction
|
4281
|
-
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "ar_ratings" [0m
|
4282
|
-
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "ar_rates"
|
4283
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
4284
|
-
[1m[35mSQL (0.3ms)[0m INSERT INTO "posts" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?) [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "ut eligendi ut at sint"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
4285
|
-
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
4286
|
-
[1m[35m (0.0ms)[0m begin transaction
|
4287
|
-
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "Santos"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
4288
|
-
[1m[35m (0.8ms)[0m commit transaction
|
4289
|
-
[1m[36mActsRateable::Rate Load (0.1ms)[0m [1mSELECT "ar_rates".* FROM "ar_rates" WHERE "ar_rates"."resource_type" = 'User' AND "ar_rates"."resource_id" = 243 AND "ar_rates"."author_type" = 'Post' AND "ar_rates"."author_id" = 112 LIMIT 1[0m
|
4290
|
-
[1m[35m (0.0ms)[0m begin transaction
|
4291
|
-
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = 112 LIMIT 1[0m
|
4292
|
-
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = 243 LIMIT 1
|
4293
|
-
[1m[36mActsRateable::Rate Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "ar_rates" WHERE ("ar_rates"."author_id" = 112 AND "ar_rates"."author_type" = 'Post' AND "ar_rates"."resource_id" = 243 AND "ar_rates"."resource_type" = 'User') LIMIT 1[0m
|
4294
|
-
[1m[35mSQL (0.3ms)[0m INSERT INTO "ar_rates" ("author_id", "author_type", "created_at", "resource_id", "resource_type", "updated_at", "value") VALUES (?, ?, ?, ?, ?, ?, ?) [["author_id", 112], ["author_type", "Post"], ["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["resource_id", 243], ["resource_type", "User"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", 4]]
|
4295
|
-
[1m[36mActsRateable::Rating Load (0.1ms)[0m [1mSELECT "ar_ratings".* FROM "ar_ratings" WHERE "ar_ratings"."resource_type" = 'User' AND "ar_ratings"."resource_id" = 243 LIMIT 1[0m
|
4296
|
-
[1m[35m (0.1ms)[0m SELECT COUNT(*) total_ratings, COALESCE(SUM(value),0) rating_sum, COALESCE(AVG(value),0) rating_avg FROM ar_rates WHERE resource_type = 'User' and resource_id = '243'
|
4297
|
-
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 243 LIMIT 1[0m
|
4298
|
-
[1m[35mSQL (0.2ms)[0m INSERT INTO "ar_ratings" ("average", "created_at", "estimate", "resource_id", "resource_type", "sum", "total", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["average", #<BigDecimal:7fb2b749a4c8,'0.4E1',9(45)>], ["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["estimate", #<BigDecimal:7fb2b749a310,'0.4E1',9(45)>], ["resource_id", 243], ["resource_type", "User"], ["sum", 4], ["total", 1], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00]]
|
4299
|
-
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'User') rated_count, ((SELECT COUNT(*) from ar_rates WHERE resource_type = 'User') / (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'User')) avg_num_ratings FROM ar_rates WHERE resource_type = 'User'[0m
|
4300
|
-
[1m[35m (0.8ms)[0m commit transaction
|
4301
|
-
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "ar_rates" [0m
|
4302
|
-
[1m[35m (0.0ms)[0m begin transaction
|
4303
|
-
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "posts" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "nulla dolorem molestias rem architecto"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
4304
|
-
[1m[35m (0.8ms)[0m commit transaction
|
4305
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
4306
|
-
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?) [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "Stephan"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
4307
|
-
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
4308
|
-
[1m[35mActsRateable::Rate Load (0.1ms)[0m SELECT "ar_rates".* FROM "ar_rates" WHERE "ar_rates"."resource_type" = 'User' AND "ar_rates"."resource_id" = 244 AND "ar_rates"."author_type" = 'Post' AND "ar_rates"."author_id" = 113 LIMIT 1
|
4309
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
4310
|
-
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 113 LIMIT 1
|
4311
|
-
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 244 LIMIT 1[0m
|
4312
|
-
[1m[35mActsRateable::Rate Exists (0.1ms)[0m SELECT 1 AS one FROM "ar_rates" WHERE ("ar_rates"."author_id" = 113 AND "ar_rates"."author_type" = 'Post' AND "ar_rates"."resource_id" = 244 AND "ar_rates"."resource_type" = 'User') LIMIT 1
|
4313
|
-
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "ar_rates" ("author_id", "author_type", "created_at", "resource_id", "resource_type", "updated_at", "value") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["author_id", 113], ["author_type", "Post"], ["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["resource_id", 244], ["resource_type", "User"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", 4]]
|
4314
|
-
[1m[35mActsRateable::Rating Load (0.1ms)[0m SELECT "ar_ratings".* FROM "ar_ratings" WHERE "ar_ratings"."resource_type" = 'User' AND "ar_ratings"."resource_id" = 244 LIMIT 1
|
4315
|
-
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) total_ratings, COALESCE(SUM(value),0) rating_sum, COALESCE(AVG(value),0) rating_avg FROM ar_rates WHERE resource_type = 'User' and resource_id = '244'[0m
|
4316
|
-
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = 244 LIMIT 1
|
4317
|
-
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "ar_ratings" ("average", "created_at", "estimate", "resource_id", "resource_type", "sum", "total", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["average", #<BigDecimal:7fb2b61999a0,'0.4E1',9(45)>], ["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["estimate", #<BigDecimal:7fb2b61997e8,'0.4E1',9(45)>], ["resource_id", 244], ["resource_type", "User"], ["sum", 4], ["total", 1], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00]]
|
4318
|
-
[1m[35m (0.3ms)[0m SELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'User') rated_count, ((SELECT COUNT(*) from ar_rates WHERE resource_type = 'User') / (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'User')) avg_num_ratings FROM ar_rates WHERE resource_type = 'User'
|
4319
|
-
[1m[36m (1.0ms)[0m [1mcommit transaction[0m
|
4320
|
-
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "ar_ratings"
|
4321
|
-
[1m[36mActsRateable::Rate Load (0.1ms)[0m [1mSELECT "ar_rates".* FROM "ar_rates" WHERE "ar_rates"."resource_type" = 'User' AND "ar_rates"."resource_id" = 244 AND "ar_rates"."author_type" = 'Post' AND "ar_rates"."author_id" = 113 LIMIT 1[0m
|
4322
|
-
[1m[35m (0.0ms)[0m begin transaction
|
4323
|
-
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = 113 LIMIT 1[0m
|
4324
|
-
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = 244 LIMIT 1
|
4325
|
-
[1m[36mActsRateable::Rate Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "ar_rates" WHERE ("ar_rates"."author_id" = 113 AND "ar_rates"."id" != 236 AND "ar_rates"."author_type" = 'Post' AND "ar_rates"."resource_id" = 244 AND "ar_rates"."resource_type" = 'User') LIMIT 1[0m
|
4326
|
-
[1m[35mActsRateable::Rating Load (0.1ms)[0m SELECT "ar_ratings".* FROM "ar_ratings" WHERE "ar_ratings"."resource_type" = 'User' AND "ar_ratings"."resource_id" = 244 LIMIT 1
|
4327
|
-
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) total_ratings, COALESCE(SUM(value),0) rating_sum, COALESCE(AVG(value),0) rating_avg FROM ar_rates WHERE resource_type = 'User' and resource_id = '244'[0m
|
4328
|
-
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = 244 LIMIT 1
|
4329
|
-
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) total_ratings, SUM(value) rating_sum, AVG(value) rating_avg, (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'User') rated_count, ((SELECT COUNT(*) from ar_rates WHERE resource_type = 'User') / (SELECT COUNT(DISTINCT resource_id) FROM ar_rates WHERE resource_type = 'User')) avg_num_ratings FROM ar_rates WHERE resource_type = 'User'[0m
|
4330
|
-
[1m[35m (0.0ms)[0m commit transaction
|
4331
|
-
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "ar_ratings" [0m
|
4332
|
-
[1m[35m (0.0ms)[0m begin transaction
|
4333
|
-
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "posts" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "beatae iusto sunt aut saepe"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
4334
|
-
[1m[35m (0.7ms)[0m commit transaction
|
4335
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
4336
|
-
[1m[35mSQL (0.3ms)[0m INSERT INTO "posts" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?) [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "culpa ut laboriosam eaque itaque"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
4337
|
-
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
4338
|
-
[1m[35m (0.0ms)[0m begin transaction
|
4339
|
-
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "Lucious"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
4340
|
-
[1m[35m (0.9ms)[0m commit transaction
|
4341
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
4342
|
-
[1m[35mSQL (0.4ms)[0m INSERT INTO "posts" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?) [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "reprehenderit pariatur veniam ipsam cumque"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
4343
|
-
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
4344
|
-
[1m[35m (0.0ms)[0m begin transaction
|
4345
|
-
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "Lelia"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
4346
|
-
[1m[35m (1.0ms)[0m commit transaction
|
4347
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
4348
|
-
[1m[35mSQL (0.3ms)[0m INSERT INTO "posts" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?) [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "consectetur nam modi possimus ipsa"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
4349
|
-
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
4350
|
-
[1m[35m (0.0ms)[0m begin transaction
|
4351
|
-
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users" ("created_at", "name", "updated_at", "value") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["name", "Christophe"], ["updated_at", Thu, 23 May 2013 20:08:10 UTC +00:00], ["value", nil]]
|
4352
|
-
[1m[35m (0.9ms)[0m commit transaction
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: acts_rateable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-05-
|
12
|
+
date: 2013-05-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|