acts_as_starrable 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +22 -0
- data/app/assets/images/delete.gif +0 -0
- data/app/assets/images/star.gif +0 -0
- data/app/assets/javascripts/jquery.rateit.min.js +7 -2
- data/app/assets/javascripts/starrable.js +36 -30
- data/app/controllers/ratings_controller.rb +18 -1
- data/app/views/starrable/_stars.html.erb +24 -6
- data/config/routes.rb +1 -1
- data/lib/acts_as_starrable/version.rb +1 -1
- data/spec/controllers/ratings_controller_spec.rb +49 -0
- data/spec/dummy/log/development.log +1 -0
- data/spec/dummy/log/test.log +544 -0
- metadata +5 -3
- data/README.rdoc +0 -3
data/README.md
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# ActsAsStarrable
|
2
|
+
|
3
|
+
`ActsAsStarrable` is a Rails Engine that allows you to easily add ratings (stars) to your models. Being an engine, it's a full-service add-on, providing views and controllers with sane defaults that will work for most use cases. In cases where it won't work, these can be easily overridden.
|
4
|
+
|
5
|
+
To install ActsAsStarrable, add `acts_as_starrable` to your Gemfile and run `bundle install`.
|
6
|
+
|
7
|
+
The ratings model can be built by running the following:
|
8
|
+
|
9
|
+
rails g acts_as_starrable:migration
|
10
|
+
rake db:migrate
|
11
|
+
|
12
|
+
Ratings can be added to a model as follows:
|
13
|
+
|
14
|
+
class Foo < ActiveRecord::Base
|
15
|
+
acts_as_starrable
|
16
|
+
end
|
17
|
+
|
18
|
+
Finally, use the `stars` helper method in your view to display the partial:
|
19
|
+
|
20
|
+
<%= stars(@foo) %>
|
21
|
+
|
22
|
+
`ActsAsStarrable` uses the [RateIt](http://rateit.codeplex.com) jQuery plugin and conforms to the [schema.org](http://schema.org) [Rating](http://schema.org/Rating) and [AggregateRating](http://schema.org/AggregateRating) schemata for SEO goodness.
|
Binary file
|
Binary file
|
@@ -1,2 +1,7 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
/*! RateIt | v1.0.22 / 05/27/2014 | https://rateit.codeplex.com/license
|
2
|
+
http://rateit.codeplex.com | Twitter: @gjunge
|
3
|
+
*/
|
4
|
+
(function(n){function t(n){var u=n.originalEvent.changedTouches,t=u[0],i="",r;switch(n.type){case"touchmove":i="mousemove";break;case"touchend":i="mouseup";break;default:return}r=document.createEvent("MouseEvent");r.initMouseEvent(i,!0,!0,window,1,t.screenX,t.screenY,t.clientX,t.clientY,!1,!1,!1,!1,0,null);t.target.dispatchEvent(r);n.preventDefault()}n.rateit={aria:{resetLabel:"reset rating",ratingLabel:"rating"}};n.fn.rateit=function(i,r){var e=1,u={},o="init",s=function(n){return n.charAt(0).toUpperCase()+n.substr(1)},f;if(this.length===0)return this;if(f=n.type(i),f=="object"||i===undefined||i===null)u=n.extend({},n.fn.rateit.defaults,i);else{if(f=="string"&&i!=="reset"&&r===undefined)return this.data("rateit"+s(i));f=="string"&&(o="setvalue")}return this.each(function(){var c=n(this),f=function(n,t){if(t!=null){var i="aria-value"+(n=="value"?"now":n),r=c.find(".rateit-range");r.attr(i)!=undefined&&r.attr(i,t)}return arguments[0]="rateit"+s(n),c.data.apply(c,arguments)},p,w,v,h,b,g,nt,l,y,k,a;if(i=="reset"){p=f("init");for(w in p)c.data(w,p[w]);f("backingfld")&&(h=n(f("backingfld")),h.val(f("value")),h.trigger("change"),h[0].min&&(h[0].min=f("min")),h[0].max&&(h[0].max=f("max")),h[0].step&&(h[0].step=f("step")));c.trigger("reset")}if(c.hasClass("rateit")||c.addClass("rateit"),v=c.css("direction")!="rtl",o=="setvalue"){if(!f("init"))throw"Can't set value before init";i!="readonly"||r!=!0||f("readonly")||(c.find(".rateit-range").unbind(),f("wired",!1));i=="value"&&(r=r==null?f("min"):Math.max(f("min"),Math.min(f("max"),r)));f("backingfld")&&(h=n(f("backingfld")),i=="value"&&h.val(r),i=="min"&&h[0].min&&(h[0].min=r),i=="max"&&h[0].max&&(h[0].max=r),i=="step"&&h[0].step&&(h[0].step=r));f(i,r)}f("init")||(f("min",isNaN(f("min"))?u.min:f("min")),f("max",isNaN(f("max"))?u.max:f("max")),f("step",f("step")||u.step),f("readonly",f("readonly")!==undefined?f("readonly"):u.readonly),f("resetable",f("resetable")!==undefined?f("resetable"):u.resetable),f("backingfld",f("backingfld")||u.backingfld),f("starwidth",f("starwidth")||u.starwidth),f("starheight",f("starheight")||u.starheight),f("value",Math.max(f("min"),Math.min(f("max"),isNaN(f("value"))?isNaN(u.value)?u.min:u.value:f("value")))),f("ispreset",f("ispreset")!==undefined?f("ispreset"):u.ispreset),f("backingfld")&&(h=n(f("backingfld")).hide(),(h.attr("disabled")||h.attr("readonly"))&&f("readonly",!0),h[0].nodeName=="INPUT"&&(h[0].type=="range"||h[0].type=="text")&&(f("min",parseInt(h.attr("min"))||f("min")),f("max",parseInt(h.attr("max"))||f("max")),f("step",parseInt(h.attr("step"))||f("step"))),h[0].nodeName=="SELECT"&&h[0].options.length>1?(f("min",isNaN(f("min"))?Number(h[0].options[0].value):f("min")),f("max",Number(h[0].options[h[0].length-1].value)),f("step",Number(h[0].options[1].value)-Number(h[0].options[0].value)),b=h.find("option[selected]"),b.length==1&&f("value",b.val())):f("value",h.val())),g=c[0].nodeName=="DIV"?"div":"span",e++,nt='<button id="rateit-reset-{{index}}" type="button" data-role="none" class="rateit-reset" aria-label="'+n.rateit.aria.resetLabel+'" aria-controls="rateit-range-{{index}}"><\/button><{{element}} id="rateit-range-{{index}}" class="rateit-range" tabindex="0" role="slider" aria-label="'+n.rateit.aria.ratingLabel+'" aria-owns="rateit-reset-{{index}}" aria-valuemin="'+f("min")+'" aria-valuemax="'+f("max")+'" aria-valuenow="'+f("value")+'"><{{element}} class="rateit-selected" style="height:'+f("starheight")+'px"><\/{{element}}><{{element}} class="rateit-hover" style="height:'+f("starheight")+'px"><\/{{element}}><\/{{element}}>',c.append(nt.replace(/{{index}}/gi,e).replace(/{{element}}/gi,g)),v||(c.find(".rateit-reset").css("float","right"),c.find(".rateit-selected").addClass("rateit-selected-rtl"),c.find(".rateit-hover").addClass("rateit-hover-rtl")),f("init",JSON.parse(JSON.stringify(c.data()))));c.find(".rateit-selected, .rateit-hover").height(f("starheight"));l=c.find(".rateit-range");l.width(f("starwidth")*(f("max")-f("min"))).height(f("starheight"));y="rateit-preset"+(v?"":"-rtl");f("ispreset")?c.find(".rateit-selected").addClass(y):c.find(".rateit-selected").removeClass(y);f("value")!=null&&(k=(f("value")-f("min"))*f("starwidth"),c.find(".rateit-selected").width(k));a=c.find(".rateit-reset");a.data("wired")!==!0&&a.bind("click",function(t){t.preventDefault();a.blur();var i=n.Event("beforereset");if(c.trigger(i),i.isDefaultPrevented())return!1;c.rateit("value",null);c.trigger("reset")}).data("wired",!0);var tt=function(t,i){var u=i.changedTouches?i.changedTouches[0].pageX:i.pageX,r=u-n(t).offset().left;return v||(r=l.width()-r),r>l.width()&&(r=l.width()),r<0&&(r=0),k=Math.ceil(r/f("starwidth")*(1/f("step")))},it=function(n){var t=n*f("starwidth")*f("step"),r=l.find(".rateit-hover"),i;r.data("width")!=t&&(l.find(".rateit-selected").hide(),r.width(t).show().data("width",t),i=[n*f("step")+f("min")],c.trigger("hover",i).trigger("over",i))},d=function(t){var i=n.Event("beforerated");return(c.trigger(i,[t]),i.isDefaultPrevented())?!1:(f("value",t),f("backingfld")&&n(f("backingfld")).val(t).trigger("change"),f("ispreset")&&(l.find(".rateit-selected").removeClass(y),f("ispreset",!1)),l.find(".rateit-hover").hide(),l.find(".rateit-selected").width(t*f("starwidth")-f("min")*f("starwidth")).show(),c.trigger("hover",[null]).trigger("over",[null]).trigger("rated",[t]),!0)};f("readonly")?a.hide():(f("resetable")||a.hide(),f("wired")||(l.bind("touchmove touchend",t),l.mousemove(function(n){var t=tt(this,n);it(t)}),l.mouseleave(function(){l.find(".rateit-hover").hide().width(0).data("width","");c.trigger("hover",[null]).trigger("over",[null]);l.find(".rateit-selected").show()}),l.mouseup(function(n){var t=tt(this,n),i=t*f("step")+f("min");d(i);l.blur()}),l.keyup(function(n){(n.which==38||n.which==(v?39:37))&&d(Math.min(f("value")+f("step"),f("max")));(n.which==40||n.which==(v?37:39))&&d(Math.max(f("value")-f("step"),f("min")))}),f("wired",!0)),f("resetable")&&a.show());l.attr("aria-readonly",f("readonly"))})};n.fn.rateit.defaults={min:0,max:5,step:.5,starwidth:16,starheight:16,readonly:!1,resetable:!0,ispreset:!1};n(function(){n("div.rateit, span.rateit").rateit()})})(jQuery);
|
5
|
+
/*
|
6
|
+
//# sourceMappingURL=jquery.rateit.min.js.map
|
7
|
+
*/
|
@@ -1,35 +1,41 @@
|
|
1
1
|
$(document).ready(function() {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
// /*var items = [];
|
6
|
-
// $.each(data, function(key, val) {
|
7
|
-
// items.push('<li id=""' + key + '">' + val + '</li>');
|
8
|
-
// });*/
|
9
|
-
// });
|
2
|
+
console.log('r: ' + window.rating);
|
3
|
+
$('.rateit').bind('reset', function(e) {
|
4
|
+
var ri = $(this);
|
10
5
|
|
11
|
-
|
12
|
-
|
13
|
-
|
6
|
+
$.ajax({
|
7
|
+
url: '/ratings/' + window.rating + '.json',
|
8
|
+
type: 'DELETE',
|
9
|
+
success: function(data) {
|
10
|
+
window.rating = null;
|
11
|
+
ri.rateit('resetable', false);
|
12
|
+
}
|
13
|
+
});
|
14
|
+
});
|
14
15
|
|
15
|
-
|
16
|
-
|
17
|
-
var rateableID = ri.data('rateableid'); // if the product id was in some hidden field: ri.closest('li').find('input[name="productid"]').val()
|
18
|
-
var stype = 'Gallery';
|
16
|
+
$('.rateit').bind('rated', function(e) {
|
17
|
+
var ri = $(this);
|
19
18
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
19
|
+
var value = ri.rateit('value');
|
20
|
+
var rateableID = ri.data('rateableid');
|
21
|
+
var stype = window.starrable_type;
|
22
|
+
if (window.rating != null) {
|
23
|
+
$.ajax({
|
24
|
+
url: '/ratings/' + window.rating + '.json',
|
25
|
+
data: { value: value },
|
26
|
+
type: 'PUT'
|
27
|
+
});
|
28
|
+
} else {
|
29
|
+
$.ajax({
|
30
|
+
url: '/ratings.json',
|
31
|
+
data: { id: rateableID, value: value, stype: stype, rid: window.rater,
|
32
|
+
rtype: window.rater_type },
|
33
|
+
type: 'POST',
|
34
|
+
success: function(data) {
|
35
|
+
window.rating = data['id'];
|
36
|
+
ri.rateit('resetable', true);
|
37
|
+
}
|
38
|
+
});
|
39
|
+
}
|
40
|
+
});
|
35
41
|
});
|
@@ -5,11 +5,28 @@ class RatingsController < ApplicationController
|
|
5
5
|
def create
|
6
6
|
@rating = ::ActsAsStarrable::Rating.new(:starrable_type => params[:stype],
|
7
7
|
:starrable_id => params[:id],
|
8
|
-
:rating => params[:value]
|
8
|
+
:rating => params[:value],
|
9
|
+
:rater_type => params[:rtype],
|
10
|
+
:rater_id => params[:rid])
|
9
11
|
if @rating.save
|
10
12
|
render :json => @rating, :status => :created
|
11
13
|
else
|
12
14
|
render :json => @rating.errors, :status => :unprocessable_entity
|
13
15
|
end
|
14
16
|
end
|
17
|
+
|
18
|
+
def update
|
19
|
+
rating = ::ActsAsStarrable::Rating.find(params[:id])
|
20
|
+
if rating.update_attributes(:rating => params[:value])
|
21
|
+
render :nothing => true, :status => 204
|
22
|
+
else
|
23
|
+
render :nothing => true, :status => :unprocessable_entity
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def destroy
|
28
|
+
rating = ::ActsAsStarrable::Rating.find(params[:id])
|
29
|
+
rating.destroy
|
30
|
+
render :nothing => true, :status => 204
|
31
|
+
end
|
15
32
|
end
|
@@ -1,6 +1,24 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
<% if user_signed_in? %>
|
2
|
+
<% rating = ActsAsStarrable::Rating.find(:first, :conditions => {:rater_type => 'User', :rater_id => current_user.id, :starrable_type => starrable.class, :starrable_id => starrable.id}) %>
|
3
|
+
<%= javascript_tag do %>
|
4
|
+
window.rater = '<%= current_user.id %>';
|
5
|
+
window.rater_type = '<%= current_user.class %>';
|
6
|
+
window.rating = <%= rating ? rating.id : 'null' %>;
|
7
|
+
window.starrable_type = '<%= starrable.class %>';
|
8
|
+
<% end %>
|
9
|
+
<% end %>
|
10
|
+
<% if rating %>
|
11
|
+
<div class="rateit" data-rateableid="<%= starrable.id %>" data-rateit-value="<%= rating.rating %>" data-rateit-ispreset="false"></div>
|
12
|
+
<span itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">avg.
|
13
|
+
<span itemprop="ratingValue"><%= starrable.average_rating %></span> stars out of
|
14
|
+
<span itemprop="bestRating"><%= starrable.max_rating %></span>
|
15
|
+
(<span itemprop="ratingCount"><%= pluralize(starrable.ratings.count, 'rating') %></span> total).
|
16
|
+
</span>
|
17
|
+
<% else %>
|
18
|
+
<div class="rateit" data-rateableid="<%= starrable.id %>" data-rateit-value="<%= starrable.average_rating %>" data-rateit-ispreset="true" data-rateit-resetable="false" data-rateit-readonly="<%= !user_signed_in? %>"></div>
|
19
|
+
<span itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
|
20
|
+
<span itemprop="ratingValue"><%= starrable.average_rating %></span> stars out of
|
21
|
+
<span itemprop="bestRating"><%= starrable.max_rating %></span>
|
22
|
+
(<span itemprop="ratingCount"><%= pluralize(starrable.ratings.count, 'rating') %></span> total).
|
23
|
+
</span>
|
24
|
+
<% end %>
|
data/config/routes.rb
CHANGED
@@ -32,4 +32,53 @@ describe RatingsController do
|
|
32
32
|
it { should respond_with 422 }
|
33
33
|
end
|
34
34
|
end
|
35
|
+
|
36
|
+
describe '#update' do
|
37
|
+
|
38
|
+
context 'success' do
|
39
|
+
|
40
|
+
before do
|
41
|
+
expect(ActsAsStarrable::Rating).to receive(:find)
|
42
|
+
.with("#{instance.id}").and_return(instance)
|
43
|
+
expect(instance).to receive(:update_attributes)
|
44
|
+
.and_return(true)
|
45
|
+
put :update, :format => :json, :id => instance, :rating =>
|
46
|
+
{ :id => '1',
|
47
|
+
:stype => 'Flick',
|
48
|
+
:value => '3.5'
|
49
|
+
}
|
50
|
+
end
|
51
|
+
|
52
|
+
it { should respond_with 204 }
|
53
|
+
end
|
54
|
+
|
55
|
+
context 'failure' do
|
56
|
+
|
57
|
+
before do
|
58
|
+
expect(ActsAsStarrable::Rating).to receive(:find)
|
59
|
+
.with("#{instance.id}").and_return(instance)
|
60
|
+
expect(instance).to receive(:update_attributes)
|
61
|
+
.and_return(false)
|
62
|
+
put :update, :format => :json, :id => instance, :rating =>
|
63
|
+
{ :id => '1',
|
64
|
+
:stype => 'Flick',
|
65
|
+
:value => '3.5'
|
66
|
+
}
|
67
|
+
end
|
68
|
+
|
69
|
+
it { should respond_with 422 }
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
describe '#destroy' do
|
74
|
+
|
75
|
+
before do
|
76
|
+
expect(ActsAsStarrable::Rating).to receive(:find)
|
77
|
+
.with("#{instance.id}").and_return(instance)
|
78
|
+
expect(instance).to receive(:destroy).and_return(instance)
|
79
|
+
delete :destroy, :format => 'json', :id => instance
|
80
|
+
end
|
81
|
+
|
82
|
+
it { should respond_with 204 }
|
83
|
+
end
|
35
84
|
end
|
@@ -156,3 +156,4 @@ Connecting to database specified by database.yml
|
|
156
156
|
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140412132501')[0m
|
157
157
|
[1m[35m (0.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140409035450')
|
158
158
|
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140409041520')[0m
|
159
|
+
Connecting to database specified by database.yml
|
data/spec/dummy/log/test.log
CHANGED
@@ -625,3 +625,547 @@ Completed 201 Created in 1.4ms (Views: 1.0ms | ActiveRecord: 0.2ms)
|
|
625
625
|
[1m[35m (0.0ms)[0m rollback transaction
|
626
626
|
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
627
627
|
[1m[35m (0.0ms)[0m rollback transaction
|
628
|
+
Connecting to database specified by database.yml
|
629
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
630
|
+
Processing by RatingsController#create as JSON
|
631
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"2.5"}}
|
632
|
+
Completed 201 Created in 3.9ms (Views: 1.4ms | ActiveRecord: 2.1ms)
|
633
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
634
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
635
|
+
Processing by RatingsController#create as JSON
|
636
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"2.5"}}
|
637
|
+
Completed 422 Unprocessable Entity in 0.3ms (Views: 0.1ms | ActiveRecord: 0.0ms)
|
638
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
639
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
640
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
641
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
642
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
643
|
+
Connecting to database specified by database.yml
|
644
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
645
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
646
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
647
|
+
Processing by RatingsController#create as JSON
|
648
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"2.5"}}
|
649
|
+
Completed 201 Created in 34.7ms (Views: 1.1ms | ActiveRecord: 33.2ms)
|
650
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
651
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
652
|
+
Processing by RatingsController#create as JSON
|
653
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"2.5"}}
|
654
|
+
Completed 422 Unprocessable Entity in 0.3ms (Views: 0.1ms | ActiveRecord: 0.0ms)
|
655
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
656
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
657
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
658
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
659
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
660
|
+
Connecting to database specified by database.yml
|
661
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
662
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
663
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
664
|
+
Processing by RatingsController#create as JSON
|
665
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"2.5"}}
|
666
|
+
Completed 422 Unprocessable Entity in 0.5ms (Views: 0.1ms | ActiveRecord: 0.0ms)
|
667
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
668
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
669
|
+
Processing by RatingsController#create as JSON
|
670
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"2.5"}}
|
671
|
+
Completed 201 Created in 8.2ms (Views: 1.4ms | ActiveRecord: 6.7ms)
|
672
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
673
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
674
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
675
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
676
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
677
|
+
Connecting to database specified by database.yml
|
678
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
679
|
+
Processing by RatingsController#create as JSON
|
680
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"2.5"}}
|
681
|
+
Completed 201 Created in 6.8ms (Views: 1.4ms | ActiveRecord: 5.1ms)
|
682
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
683
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
684
|
+
Processing by RatingsController#create as JSON
|
685
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"2.5"}}
|
686
|
+
Completed 422 Unprocessable Entity in 0.3ms (Views: 0.1ms | ActiveRecord: 0.0ms)
|
687
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
688
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
689
|
+
Processing by RatingsController#destroy as JSON
|
690
|
+
Parameters: {"id"=>"1003"}
|
691
|
+
Completed 500 Internal Server Error in 41.0ms
|
692
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
693
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
694
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
695
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
696
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
697
|
+
Connecting to database specified by database.yml
|
698
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
699
|
+
Processing by RatingsController#create as JSON
|
700
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"2.5"}}
|
701
|
+
Completed 201 Created in 3.7ms (Views: 1.4ms | ActiveRecord: 2.0ms)
|
702
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
703
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
704
|
+
Processing by RatingsController#create as JSON
|
705
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"2.5"}}
|
706
|
+
Completed 422 Unprocessable Entity in 0.3ms (Views: 0.1ms | ActiveRecord: 0.0ms)
|
707
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
708
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
709
|
+
Processing by RatingsController#destroy as JSON
|
710
|
+
Parameters: {"id"=>"1003"}
|
711
|
+
Completed 500 Internal Server Error in 40.1ms
|
712
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
713
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
714
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
715
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
716
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
717
|
+
Connecting to database specified by database.yml
|
718
|
+
[1m[36m (581.7ms)[0m [1mbegin transaction[0m
|
719
|
+
Processing by RatingsController#destroy as JSON
|
720
|
+
Parameters: {"id"=>"1001"}
|
721
|
+
Completed 500 Internal Server Error in 16.5ms
|
722
|
+
[1m[35m (0.3ms)[0m rollback transaction
|
723
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
724
|
+
Processing by RatingsController#create as JSON
|
725
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"2.5"}}
|
726
|
+
Completed 422 Unprocessable Entity in 0.5ms (Views: 0.1ms | ActiveRecord: 0.0ms)
|
727
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
728
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
729
|
+
Processing by RatingsController#create as JSON
|
730
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"2.5"}}
|
731
|
+
Completed 201 Created in 28.8ms (Views: 1.4ms | ActiveRecord: 27.3ms)
|
732
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
733
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
734
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
735
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
736
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
737
|
+
Connecting to database specified by database.yml
|
738
|
+
[1m[36m (24.6ms)[0m [1mbegin transaction[0m
|
739
|
+
Processing by RatingsController#create as JSON
|
740
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"2.5"}}
|
741
|
+
Completed 201 Created in 48.5ms (Views: 1.4ms | ActiveRecord: 46.7ms)
|
742
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
743
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
744
|
+
Processing by RatingsController#create as JSON
|
745
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"2.5"}}
|
746
|
+
Completed 422 Unprocessable Entity in 0.3ms (Views: 0.1ms | ActiveRecord: 0.0ms)
|
747
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
748
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
749
|
+
Processing by RatingsController#destroy as JSON
|
750
|
+
Parameters: {"id"=>"1003"}
|
751
|
+
Completed 200 OK in 68.9ms (Views: 68.6ms | ActiveRecord: 0.0ms)
|
752
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
753
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
754
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
755
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
756
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
757
|
+
Connecting to database specified by database.yml
|
758
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
759
|
+
Processing by RatingsController#create as JSON
|
760
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"2.5"}}
|
761
|
+
Completed 201 Created in 4.0ms (Views: 1.5ms | ActiveRecord: 2.1ms)
|
762
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
763
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
764
|
+
Processing by RatingsController#create as JSON
|
765
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"2.5"}}
|
766
|
+
Completed 422 Unprocessable Entity in 0.3ms (Views: 0.1ms | ActiveRecord: 0.0ms)
|
767
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
768
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
769
|
+
Processing by RatingsController#destroy as JSON
|
770
|
+
Parameters: {"id"=>"1003"}
|
771
|
+
Completed 204 No Content in 276.0ms (Views: 275.8ms | ActiveRecord: 0.0ms)
|
772
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
773
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
774
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
775
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
776
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
777
|
+
Connecting to database specified by database.yml
|
778
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
779
|
+
Processing by RatingsController#create as JSON
|
780
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"2.5"}}
|
781
|
+
Completed 201 Created in 4.0ms (Views: 1.4ms | ActiveRecord: 2.2ms)
|
782
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
783
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
784
|
+
Processing by RatingsController#create as JSON
|
785
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"2.5"}}
|
786
|
+
Completed 422 Unprocessable Entity in 0.3ms (Views: 0.1ms | ActiveRecord: 0.0ms)
|
787
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
788
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
789
|
+
Processing by RatingsController#destroy as JSON
|
790
|
+
Parameters: {"id"=>"1003"}
|
791
|
+
Completed 204 No Content in 38.1ms (Views: 37.8ms | ActiveRecord: 0.0ms)
|
792
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
793
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
794
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
795
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
796
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
797
|
+
Connecting to database specified by database.yml
|
798
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
799
|
+
Processing by RatingsController#destroy as JSON
|
800
|
+
Parameters: {"id"=>"1001"}
|
801
|
+
Rendered text template (0.0ms)
|
802
|
+
Completed 204 No Content in 11.5ms (Views: 11.2ms | ActiveRecord: 0.0ms)
|
803
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
804
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
805
|
+
Processing by RatingsController#create as JSON
|
806
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"2.5"}}
|
807
|
+
Completed 422 Unprocessable Entity in 0.4ms (Views: 0.1ms | ActiveRecord: 0.0ms)
|
808
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
809
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
810
|
+
Processing by RatingsController#create as JSON
|
811
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"2.5"}}
|
812
|
+
Completed 201 Created in 0.6ms (Views: 0.4ms | ActiveRecord: 0.0ms)
|
813
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
814
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
815
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
816
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
817
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
818
|
+
Connecting to database specified by database.yml
|
819
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
820
|
+
Processing by RatingsController#create as JSON
|
821
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"2.5"}}
|
822
|
+
Completed 201 Created in 3.6ms (Views: 1.4ms | ActiveRecord: 1.9ms)
|
823
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
824
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
825
|
+
Processing by RatingsController#create as JSON
|
826
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"2.5"}}
|
827
|
+
Completed 422 Unprocessable Entity in 0.3ms (Views: 0.1ms | ActiveRecord: 0.0ms)
|
828
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
829
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
830
|
+
Processing by RatingsController#destroy as JSON
|
831
|
+
Parameters: {"id"=>"1003"}
|
832
|
+
Completed 204 No Content in 36.3ms (Views: 36.0ms | ActiveRecord: 0.0ms)
|
833
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
834
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
835
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
836
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
837
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
838
|
+
Connecting to database specified by database.yml
|
839
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
840
|
+
Processing by RatingsController#destroy as JSON
|
841
|
+
Parameters: {"id"=>"1001"}
|
842
|
+
Rendered text template (0.0ms)
|
843
|
+
Completed 204 No Content in 11.2ms (Views: 10.8ms | ActiveRecord: 0.0ms)
|
844
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
845
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
846
|
+
Processing by RatingsController#create as JSON
|
847
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"2.5"}}
|
848
|
+
Completed 422 Unprocessable Entity in 0.4ms (Views: 0.1ms | ActiveRecord: 0.0ms)
|
849
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
850
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
851
|
+
Processing by RatingsController#create as JSON
|
852
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"2.5"}}
|
853
|
+
Completed 201 Created in 28.4ms (Views: 1.5ms | ActiveRecord: 26.7ms)
|
854
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
855
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
856
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
857
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
858
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
859
|
+
Connecting to database specified by database.yml
|
860
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
861
|
+
Processing by RatingsController#create as JSON
|
862
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"2.5"}}
|
863
|
+
Completed 201 Created in 3.6ms (Views: 1.4ms | ActiveRecord: 1.9ms)
|
864
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
865
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
866
|
+
Processing by RatingsController#create as JSON
|
867
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"2.5"}}
|
868
|
+
Completed 422 Unprocessable Entity in 0.3ms (Views: 0.1ms | ActiveRecord: 0.0ms)
|
869
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
870
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
871
|
+
Processing by RatingsController#destroy as JSON
|
872
|
+
Parameters: {"id"=>"1003"}
|
873
|
+
Completed 204 No Content in 35.9ms (Views: 35.6ms | ActiveRecord: 0.0ms)
|
874
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
875
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
876
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
877
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
878
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
879
|
+
Connecting to database specified by database.yml
|
880
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
881
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
882
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
883
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
884
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
885
|
+
Processing by RatingsController#destroy as JSON
|
886
|
+
Parameters: {"id"=>"1001"}
|
887
|
+
Rendered text template (0.0ms)
|
888
|
+
Completed 204 No Content in 41.3ms (Views: 40.9ms | ActiveRecord: 0.0ms)
|
889
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
890
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
891
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
892
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
893
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
894
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
895
|
+
Processing by RatingsController#create as JSON
|
896
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"2.5"}}
|
897
|
+
Completed 201 Created in 1.6ms (Views: 1.0ms | ActiveRecord: 0.2ms)
|
898
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
899
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
900
|
+
Processing by RatingsController#create as JSON
|
901
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"2.5"}}
|
902
|
+
Completed 422 Unprocessable Entity in 0.3ms (Views: 0.1ms | ActiveRecord: 0.0ms)
|
903
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
904
|
+
Connecting to database specified by database.yml
|
905
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
906
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
907
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
908
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
909
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
910
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
911
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
912
|
+
Processing by RatingsController#create as JSON
|
913
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"2.5"}}
|
914
|
+
Completed 201 Created in 1.6ms (Views: 1.1ms | ActiveRecord: 0.2ms)
|
915
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
916
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
917
|
+
Processing by RatingsController#create as JSON
|
918
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"2.5"}}
|
919
|
+
Completed 422 Unprocessable Entity in 0.3ms (Views: 0.1ms | ActiveRecord: 0.0ms)
|
920
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
921
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
922
|
+
Processing by RatingsController#destroy as JSON
|
923
|
+
Parameters: {"id"=>"1005"}
|
924
|
+
Completed 204 No Content in 43.2ms (Views: 42.8ms | ActiveRecord: 0.0ms)
|
925
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
926
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
927
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
928
|
+
Connecting to database specified by database.yml
|
929
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
930
|
+
Processing by RatingsController#create as JSON
|
931
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"2.5"}}
|
932
|
+
Completed 201 Created in 3.5ms (Views: 1.4ms | ActiveRecord: 1.9ms)
|
933
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
934
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
935
|
+
Processing by RatingsController#create as JSON
|
936
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"2.5"}}
|
937
|
+
Completed 422 Unprocessable Entity in 0.3ms (Views: 0.1ms | ActiveRecord: 0.0ms)
|
938
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
939
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
940
|
+
Processing by RatingsController#update as JSON
|
941
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"3.5"}, "id"=>"1003"}
|
942
|
+
Completed 500 Internal Server Error in 57.8ms
|
943
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
944
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
945
|
+
Processing by RatingsController#update as JSON
|
946
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"3.5"}, "id"=>"1004"}
|
947
|
+
Completed 500 Internal Server Error in 0.5ms
|
948
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
949
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
950
|
+
Processing by RatingsController#destroy as JSON
|
951
|
+
Parameters: {"id"=>"1005"}
|
952
|
+
Completed 204 No Content in 2.3ms (Views: 2.0ms | ActiveRecord: 0.0ms)
|
953
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
954
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
955
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
956
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
957
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
958
|
+
Connecting to database specified by database.yml
|
959
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
960
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
961
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
962
|
+
Processing by RatingsController#update as JSON
|
963
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"3.5"}, "id"=>"1001"}
|
964
|
+
Rendered text template (0.0ms)
|
965
|
+
Completed 200 OK in 40.9ms (Views: 40.6ms | ActiveRecord: 0.0ms)
|
966
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
967
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
968
|
+
Processing by RatingsController#update as JSON
|
969
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"3.5"}, "id"=>"1002"}
|
970
|
+
Completed 200 OK in 0.3ms (Views: 0.2ms | ActiveRecord: 0.0ms)
|
971
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
972
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
973
|
+
Processing by RatingsController#create as JSON
|
974
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"2.5"}}
|
975
|
+
Completed 201 Created in 1.5ms (Views: 1.0ms | ActiveRecord: 0.2ms)
|
976
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
977
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
978
|
+
Processing by RatingsController#create as JSON
|
979
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"2.5"}}
|
980
|
+
Completed 422 Unprocessable Entity in 0.3ms (Views: 0.1ms | ActiveRecord: 0.0ms)
|
981
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
982
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
983
|
+
Processing by RatingsController#destroy as JSON
|
984
|
+
Parameters: {"id"=>"1005"}
|
985
|
+
Completed 204 No Content in 0.5ms (Views: 0.2ms | ActiveRecord: 0.0ms)
|
986
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
987
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
988
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
989
|
+
Connecting to database specified by database.yml
|
990
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
991
|
+
Processing by RatingsController#create as JSON
|
992
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"2.5"}}
|
993
|
+
Completed 201 Created in 3.6ms (Views: 1.4ms | ActiveRecord: 1.9ms)
|
994
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
995
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
996
|
+
Processing by RatingsController#create as JSON
|
997
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"2.5"}}
|
998
|
+
Completed 422 Unprocessable Entity in 0.3ms (Views: 0.1ms | ActiveRecord: 0.0ms)
|
999
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1000
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1001
|
+
Processing by RatingsController#update as JSON
|
1002
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"3.5"}, "id"=>"1003"}
|
1003
|
+
Completed 204 No Content in 36.1ms (Views: 35.8ms | ActiveRecord: 0.0ms)
|
1004
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1005
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1006
|
+
Processing by RatingsController#update as JSON
|
1007
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"3.5"}, "id"=>"1004"}
|
1008
|
+
Completed 204 No Content in 0.3ms (Views: 0.2ms | ActiveRecord: 0.0ms)
|
1009
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1010
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1011
|
+
Processing by RatingsController#destroy as JSON
|
1012
|
+
Parameters: {"id"=>"1005"}
|
1013
|
+
Completed 204 No Content in 0.5ms (Views: 0.2ms | ActiveRecord: 0.0ms)
|
1014
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1015
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1016
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1017
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1018
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1019
|
+
Connecting to database specified by database.yml
|
1020
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
1021
|
+
Processing by RatingsController#create as JSON
|
1022
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"2.5"}}
|
1023
|
+
Completed 422 Unprocessable Entity in 0.5ms (Views: 0.1ms | ActiveRecord: 0.0ms)
|
1024
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1025
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1026
|
+
Processing by RatingsController#create as JSON
|
1027
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"2.5"}}
|
1028
|
+
Completed 201 Created in 3.4ms (Views: 1.3ms | ActiveRecord: 1.9ms)
|
1029
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1030
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1031
|
+
Processing by RatingsController#update as JSON
|
1032
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"3.5"}, "id"=>"1003"}
|
1033
|
+
Completed 204 No Content in 36.1ms (Views: 35.8ms | ActiveRecord: 0.0ms)
|
1034
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1035
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1036
|
+
Processing by RatingsController#update as JSON
|
1037
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"3.5"}, "id"=>"1004"}
|
1038
|
+
Completed 204 No Content in 0.4ms (Views: 0.2ms | ActiveRecord: 0.0ms)
|
1039
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1040
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1041
|
+
Processing by RatingsController#destroy as JSON
|
1042
|
+
Parameters: {"id"=>"1005"}
|
1043
|
+
Completed 204 No Content in 0.5ms (Views: 0.2ms | ActiveRecord: 0.0ms)
|
1044
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1045
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1046
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1047
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1048
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1049
|
+
Connecting to database specified by database.yml
|
1050
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
1051
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1052
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1053
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1054
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1055
|
+
Processing by RatingsController#destroy as JSON
|
1056
|
+
Parameters: {"id"=>"1001"}
|
1057
|
+
Rendered text template (0.0ms)
|
1058
|
+
Completed 204 No Content in 41.5ms (Views: 41.1ms | ActiveRecord: 0.0ms)
|
1059
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1060
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1061
|
+
Processing by RatingsController#update as JSON
|
1062
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"3.5"}, "id"=>"1002"}
|
1063
|
+
Completed 204 No Content in 0.6ms (Views: 0.3ms | ActiveRecord: 0.0ms)
|
1064
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1065
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1066
|
+
Processing by RatingsController#update as JSON
|
1067
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"3.5"}, "id"=>"1003"}
|
1068
|
+
Completed 422 Unprocessable Entity in 0.4ms (Views: 0.2ms | ActiveRecord: 0.0ms)
|
1069
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1070
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1071
|
+
Processing by RatingsController#create as JSON
|
1072
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"2.5"}}
|
1073
|
+
Completed 201 Created in 1.5ms (Views: 1.0ms | ActiveRecord: 0.2ms)
|
1074
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1075
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1076
|
+
Processing by RatingsController#create as JSON
|
1077
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"2.5"}}
|
1078
|
+
Completed 422 Unprocessable Entity in 0.3ms (Views: 0.1ms | ActiveRecord: 0.0ms)
|
1079
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1080
|
+
Connecting to database specified by database.yml
|
1081
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
1082
|
+
Processing by RatingsController#create as JSON
|
1083
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"2.5"}}
|
1084
|
+
Completed 201 Created in 3.6ms (Views: 1.4ms | ActiveRecord: 1.9ms)
|
1085
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1086
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1087
|
+
Processing by RatingsController#create as JSON
|
1088
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"2.5"}}
|
1089
|
+
Completed 422 Unprocessable Entity in 0.3ms (Views: 0.1ms | ActiveRecord: 0.0ms)
|
1090
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1091
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1092
|
+
Processing by RatingsController#update as JSON
|
1093
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"3.5"}, "id"=>"1003"}
|
1094
|
+
Completed 204 No Content in 36.3ms (Views: 35.9ms | ActiveRecord: 0.0ms)
|
1095
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1096
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1097
|
+
Processing by RatingsController#update as JSON
|
1098
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"3.5"}, "id"=>"1004"}
|
1099
|
+
Completed 422 Unprocessable Entity in 0.4ms (Views: 0.2ms | ActiveRecord: 0.0ms)
|
1100
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1101
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1102
|
+
Processing by RatingsController#destroy as JSON
|
1103
|
+
Parameters: {"id"=>"1005"}
|
1104
|
+
Completed 204 No Content in 0.5ms (Views: 0.2ms | ActiveRecord: 0.0ms)
|
1105
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1106
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1107
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1108
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1109
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1110
|
+
Connecting to database specified by database.yml
|
1111
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
1112
|
+
Processing by RatingsController#create as JSON
|
1113
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"2.5"}}
|
1114
|
+
Completed 201 Created in 3.9ms (Views: 1.4ms | ActiveRecord: 2.1ms)
|
1115
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1116
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1117
|
+
Processing by RatingsController#create as JSON
|
1118
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"2.5"}}
|
1119
|
+
Completed 422 Unprocessable Entity in 0.3ms (Views: 0.1ms | ActiveRecord: 0.0ms)
|
1120
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1121
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1122
|
+
Processing by RatingsController#update as JSON
|
1123
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"3.5"}, "id"=>"1003"}
|
1124
|
+
Completed 204 No Content in 38.7ms (Views: 38.3ms | ActiveRecord: 0.0ms)
|
1125
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1126
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1127
|
+
Processing by RatingsController#update as JSON
|
1128
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"3.5"}, "id"=>"1004"}
|
1129
|
+
Completed 422 Unprocessable Entity in 0.4ms (Views: 0.2ms | ActiveRecord: 0.0ms)
|
1130
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1131
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1132
|
+
Processing by RatingsController#destroy as JSON
|
1133
|
+
Parameters: {"id"=>"1005"}
|
1134
|
+
Completed 204 No Content in 0.5ms (Views: 0.2ms | ActiveRecord: 0.0ms)
|
1135
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1136
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1137
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1138
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1139
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1140
|
+
Connecting to database specified by database.yml
|
1141
|
+
Connecting to database specified by database.yml
|
1142
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
1143
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1144
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1145
|
+
Processing by RatingsController#destroy as JSON
|
1146
|
+
Parameters: {"id"=>"1001"}
|
1147
|
+
Rendered text template (0.0ms)
|
1148
|
+
Completed 204 No Content in 42.4ms (Views: 42.0ms | ActiveRecord: 0.0ms)
|
1149
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1150
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1151
|
+
Processing by RatingsController#create as JSON
|
1152
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"2.5"}}
|
1153
|
+
Completed 201 Created in 1.5ms (Views: 1.0ms | ActiveRecord: 0.2ms)
|
1154
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1155
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1156
|
+
Processing by RatingsController#create as JSON
|
1157
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"2.5"}}
|
1158
|
+
Completed 422 Unprocessable Entity in 0.3ms (Views: 0.1ms | ActiveRecord: 0.0ms)
|
1159
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1160
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1161
|
+
Processing by RatingsController#update as JSON
|
1162
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"3.5"}, "id"=>"1004"}
|
1163
|
+
Completed 204 No Content in 0.5ms (Views: 0.2ms | ActiveRecord: 0.0ms)
|
1164
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1165
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1166
|
+
Processing by RatingsController#update as JSON
|
1167
|
+
Parameters: {"rating"=>{"id"=>"1", "stype"=>"Flick", "value"=>"3.5"}, "id"=>"1005"}
|
1168
|
+
Completed 422 Unprocessable Entity in 0.4ms (Views: 0.2ms | ActiveRecord: 0.0ms)
|
1169
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1170
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1171
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: acts_as_starrable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
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: 2014-
|
12
|
+
date: 2014-06-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -146,6 +146,8 @@ executables: []
|
|
146
146
|
extensions: []
|
147
147
|
extra_rdoc_files: []
|
148
148
|
files:
|
149
|
+
- app/assets/images/delete.gif
|
150
|
+
- app/assets/images/star.gif
|
149
151
|
- app/assets/javascripts/application.js
|
150
152
|
- app/assets/javascripts/jquery.rateit.min.js
|
151
153
|
- app/assets/javascripts/starrable.js
|
@@ -168,7 +170,7 @@ files:
|
|
168
170
|
- lib/tasks/acts_as_starrable_tasks.rake
|
169
171
|
- MIT-LICENSE
|
170
172
|
- Rakefile
|
171
|
-
- README.
|
173
|
+
- README.md
|
172
174
|
- spec/controllers/ratings_controller_spec.rb
|
173
175
|
- spec/dummy/app/assets/images/rails.png
|
174
176
|
- spec/dummy/app/assets/javascripts/application.js
|
data/README.rdoc
DELETED