简单评价 Ruby on Rails 3
有谁知道有什么好的且兼容RoR 3的评级插件吗?
我更喜欢竖起大拇指,不喜欢竖起大拇指,但星级也很好。
我知道 ajaxful_ rating 有一个 Rails 3 分支,但如果您通过拇指找到了更好的东西,我想听听您的意见。
谢谢
编辑:
找到一个例子:
<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??
);
});
});
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??
);
});
});
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我正在为我的网站进行 0-3 星级评级。我没有使用任何 RoR gems/插件来执行此操作(我只是使用 user_id、rater_id 和分数创建了一个评级模型)。然后我使用了这个 jQuery 插件(http://plugins.jquery.com/project/Star_Rating_widget)显示实际星级。它工作得很好并且非常可定制。
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.
这可能很方便:
http ://teachmetocode.com/screencasts/building-a-star- rating-system-in-ruby-on-rails-with-jquery/
This could be handy:
http://teachmetocode.com/screencasts/building-a-star-rating-system-in-ruby-on-rails-with-jquery/
RatyRate 怎么样?这是一个快速解决方案,带有 5 星级的 gem。
这是一个很好的解释: http://www.sitepoint.com/ratyrate -add- rating-rails-app/
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/
这里有评级工具:
https://www.ruby-toolbox.com/categories/rails_ ratings
我推荐你https://github.com/muratguzel/letsrate
Here you have rating tools:
https://www.ruby-toolbox.com/categories/rails_ratings
I recomend you https://github.com/muratguzel/letsrate