Skip to content
This repository has been archived by the owner on Feb 5, 2021. It is now read-only.

failed to set max stars with dimension #92

Open
arthurccube opened this issue Jan 25, 2013 · 1 comment
Open

failed to set max stars with dimension #92

arthurccube opened this issue Jan 25, 2013 · 1 comment

Comments

@arthurccube
Copy link

Hi,

I tried to set the max star to 100 but it fails. I suspect its due to the using of dimensions together:
ajaxful_rateable :stars => 100, :dimensions => [:grade, :overall]

Max star is always 5 no matter how I change the value

as in my another model, the :stars can be changed from the following:
ajaxful_rateable :stars => 10, :cache_column => :rating_average

@arthurccube
Copy link
Author

Guys, I found the :dimensions makes max_stars failed.
I printed the "self.ajaxful_rating_options", the ":stars" keeps to be 5 with the "dimensions",

but without "dimensions", "stars" can change to 10.

And my workaround is called the update myself! (hopefully, there is some fix for it):

ajaxful_rateable :stars => 10, :dimensions => [:grade, :overall]
self.ajaxful_rating_options.update({:stars => 10, :dimensions => [:grade, :overall]})

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant