开发者

Simple rating Ruby on Rails 3

Does anyone know any good and compatible with RoR 3 plugin for rating?

I prefer thumbs up, thumbs down but star rating is fine as well.

I know that ajaxful_rating has a Rails 3 branch but I would like to hear your opinion if you have found something better with thumbs.

Thanks

Edit:

Found an example:

<img class="rate up" src="thumns_up.png" alt="Rate Up" />
<img class="rate down" 开发者_运维问答src="thumns_down.png" alt="Rate Down" />


$(document).ready(function() {
 $("img.rate").click(function () {
       var val = ($(this).hasClass("up") == true) ? "1" : "-1";
       $.ajax(
             // Where should I pass the val?? 
       );
 });
});


I'm doing a 0-3 star rating for my site. I'm not using any RoR gems/plugins to do it (I just created a Rating model with user_id, rater_id, and score). Then I used this jQuery plugin (http://plugins.jquery.com/project/Star_Rating_widget) to display the actual star ratings. It works great and is very customizable.


This could be handy:

http://teachmetocode.com/screencasts/building-a-star-rating-system-in-ruby-on-rails-with-jquery/


What about RatyRate? It's a quick solution with gem for 5 star ratings.

Here's an good explanation about it: http://www.sitepoint.com/ratyrate-add-rating-rails-app/


Here you have rating tools:

https://www.ruby-toolbox.com/categories/rails_ratings

I recomend you https://github.com/muratguzel/letsrate

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜