Hi, I wanna rate an object on multiple criteria Like.. Benefits Applicability etc.. So i would want the user to rate an object on 2 criteria. Is there any plugin which will suit my need.Acts_as_rateable allows only rating on a single context.. Thanks In Advance.. Charanya Nagarajan -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I think you will have to modify a plugin manually, I don''t know a plugin that does it automatically. But it shouldn''t be hard. On Mon, Jun 21, 2010 at 3:00 AM, Charanya Nagarajan <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>wrote:> Hi, > > I wanna rate an object on multiple criteria > Like.. > Benefits > Applicability > > etc.. > > So i would want the user to rate an object on 2 criteria. > Is there any plugin which will suit my need.Acts_as_rateable allows only > rating on a single context.. > > Thanks In Advance.. > > Charanya Nagarajan > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hi, As Philipe mentioned you have to modify the plugin little bit to match your requirement. Lets say you are using acts_as_ratable plugin, so they will use rate column to specify the rate. You just add few more columns like benefit_rate, applicability_rate, quality_rate and what ever you want. So in your rate method, you need to modify it little bit. From this: @post.rate( 4, current_user.id ) def rate(rating_value, user_id) r = Rate.new r.rate = rating_value r.rateable = self r.user_id = user_id r.save end To this: @post.rate( 4, 5, current_user.id ) def rate(benefit_rating, quality_rating, user_id) r = Rate.new r.benefit_rating = benefit_rating r.quality_rating = quality_rating r.rate = r.benefit_rating + r.quality_rating r.rateable = self r.user_id = user_id r.save end Just your getting rating values for benefit_rating and quality_rating. And also you can save the sum of benefit_rating and quality_rating in rate column. Hope this will work for you Regards, T.Veeraa. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.