简体   繁体   中英

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?? 
       );
 });
});

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/

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM