The plugins site is currently in development.
We've been looking to provide a higher-quality, spam-free experience at the plugins site for some time, and a major error on our part forced us to shut down the current site before we could put the new one in place. We are developing a new site, and you can follow along with its development on GitHub. For more information about this transition, including steps you can take as a plugin author to prepare, please read our post about what's going on.
class name error
| Project: | Star Rating Plugin |
| Version: | 2.5 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
in cakephp, the form names are in these format
data[Model][field_name]
in the rating, the code generates the ffg classname for the radio buttons
star_group_data[Model][field_name]
Fix:
- line 97: var n = this.name;
+ line 97: var real_name = this.name;
+ line 98: var n = real_name.replace(/[^A-Za-z0-9_\-]/g, '-');
- line 109: $.rating.groups[n].valueElem = $('<input type="hidden" name="' + n + '" value=""' + (settings.readOnly ? ' disabled="disabled"' : '') + '>');
+ line 109: $.rating.groups[n].valueElem = $('<input type="hidden" name="' + real_name + '" value=""' + (settings.readOnly ? ' disabled="disabled"' : '') + '>');
- Login to post comments

Comments
#1
+1
I've downloaded the last version (2.6.1), which is unusable with rails without this patch.
Would be great to see it in the stable version.
Thx.
Gravis