How should one implement ajaxful-ratings' 'ratings_for' for a new (RESTful) object?
i.e. I'd like to call 'ratings_for' in the form that initializes an object (e.g. /microposts/new).
[The object would not be persisted at this point, so the call to persist the ratings currently throws an internal server error.]
One strategy might be to override the 'ratings_for' generator to accept a flag (e.g. :new_rateable) that rendered a variation of the control that simply updated the value (# of stars) in the form, and to not execute the rating until the form is submitted.
How should one implement ajaxful-ratings' 'ratings_for' for a new (RESTful) object?
i.e. I'd like to call 'ratings_for' in the form that initializes an object (e.g. /microposts/new). [The object would not be persisted at this point, so the call to persist the ratings currently throws an internal server error.]
One strategy might be to override the 'ratings_for' generator to accept a flag (e.g. :new_rateable) that rendered a variation of the control that simply updated the value (# of stars) in the form, and to not execute the rating until the form is submitted.
Suggestions?