开发者

Change combobox with rating values to a 5 Star system in my rails app

Right now I have a 5 star rating system in my application, but the way I have the users to vote is through a combo box with the values raging from 1-5. I'd like to change this combo box for a 5 star rating system (It can be post) doesn't have to be ajaxful.

I have taken a look at this gem https://github.com/edgarj开发者_StackOverflow社区s/ajaxful-rating and I already got displaying the static "rating" column number from the database into a set of stars, but the I can't seem to get it working for the vote...

Any suggestions?


If you don't need AJAX (and I don't think you do), you can simply use some clientside script to convert your existing dropdowns to star selector.

Simple googling gives this solution, jQuery based:

http://orkans-tmp.22web.net/star_rating/

I'm sure there's a plenty of other solutions alike, so you can choose one that suits you the best.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜