0

I'm really messed up with javascript, is anyone willing to walk me through setting up a star rating with acts_as_rateable plugin and either http://orkans-tmp.22web.net/star_rating/ or http://rateit.codeplex.com/

I've already got acts_as_rateable set up and working fine. I was following this http://miguelsanmiguel.com/2010/11/28/star-rating-for-rails-3-and-jquery but I hit a wall maybe with jquery 1.6 or something else I can't figure it out.

I believe I need a form_for, a helper and maybe some js code somewhere??

I will need to display multiple ratings on the same page for various items, but only one main item will be rateable.

Julien
  • 185
  • 1
  • 2
  • 15

1 Answers1

0

For the item that you want users to be able to give a rating, you need a form which posts the rating to the corresponding model.

This rubydoc is an instant unobtrusive AJAX solution for rails 2.3

Episode 101 on Refactoring Out Helper Objects might be helpful to watch, it may be a bit dated since its posted in 2008 but Ryan is good at explaining things

Julien
  • 185
  • 1
  • 2
  • 15
suweller
  • 514
  • 3
  • 13
  • Yes it's RoR 2.3, that is why I mentioned it. The github page does contain a [rails3 branch](https://github.com/kamui/ajaxful_rating_jquery/tree/rails3) – suweller Aug 14 '11 at 16:23
  • I tried out the ajaxful_rating and i get this error. RJS error: TypeError: Object function Element() { [native code] } has no method 'update' Any help? – Julien Aug 15 '11 at 13:15
  • I'm sorry, my JavaScript knowledge is limited. I would not know how to answer unless I really dig into the problem. Unfortunately, I don't have that kind of time. – suweller Aug 18 '11 at 13:48
  • Maybe you could add the Jquery tag as well? It might get more views that way. Someone is bound to know the complete answer to this – suweller Aug 18 '11 at 13:48