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"' : '') + '>');

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