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

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

@ericpeters0n

Description

@ericpeters0n

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions