#1 ✓invalid
Will Bunker

Issue with using the rater for 2 different sizes on same page

Reported by Will Bunker | February 7th, 2009 @ 11:51 AM

When I have 2 different objects to rate and want to set different sizes the reverse_merge is preserving the setting of the first call:

I was able to remove by the following code, but you may have a more clever solution.

def ratings_for(rateable, *args)

  #we must clear out the :class if present so that if more than one type of rater is on the page
  #the first one won't control the settings
  options[:html].delete(:class) if  !options.nil? and  options.has_key?(:html) and options[:html].has_key?(:class)

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Rails plugin to generate a simple and nice rating system ajaxly.

http://github.com/edgarjs/ajaxful-rating

People watching this ticket

Tags

Pages