edgarjs / ajaxful-rating

Provides a simple way to add rating functionality to your application.
http://rdoc.info/projects/edgarjs/ajaxful-rating
417 stars 127 forks source link

any thoughts on using this without a user model? #39

Open edla opened 14 years ago

edla commented 14 years ago

we have a site that we can't require logins for, but needs to have ratings. it would be fine if every rating was cookie based or something, or even if was completely open (anyone can put in a rating, as many times as they wanted to).

edgarjs commented 14 years ago

That's a good feature. I'll implement it in future versions. Thank you for your feedback

sennor commented 13 years ago

Is it possible to create it with the current version now?

edgarjs commented 13 years ago

Not really, unless you stub somehow a guest user.

sgreenfield commented 13 years ago

I agree, this would be a very nice feature. It would be cool if it allowed one vote per item per session, and if the user had cookies disabled, one vote per item per IP address.

romanenko commented 13 years ago

It would be great!

nilsine commented 12 years ago

You can easily do that with devise and guest user creation based on session or cookie: https://github.com/plataformatec/devise/wiki/How-To:-Create-a-guest-user

But be careful, I just pass long time with user and current_user helper issues. To allow rating for your guest you have to override :current_user in the options:

<%= ratings_for @current_or_guest_user, :current_user => @current_or_guest_user %>

Maybe the doc should be clearer on the distinction between user and :current_user ?