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

How to do 'ratings_for' a new object? #82

Open
ericpeters0n opened this issue Sep 12, 2012 · 0 comments
Open

How to do 'ratings_for' a new object? #82

ericpeters0n opened this issue Sep 12, 2012 · 0 comments

Comments

@ericpeters0n
Copy link

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?

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