ajaxful-rating icon indicating copy to clipboard operation
ajaxful-rating copied to clipboard

any thoughts on using this without a user model?

Open edla opened this issue 14 years ago • 6 comments

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).

edla avatar Jul 21 '10 13:07 edla

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

edgarjs avatar Jul 21 '10 16:07 edgarjs

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

sennor avatar Mar 13 '11 18:03 sennor

Not really, unless you stub somehow a guest user.

edgarjs avatar Mar 14 '11 04:03 edgarjs

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.

sgreenfield avatar Apr 15 '11 14:04 sgreenfield

It would be great!

romanenko avatar Apr 20 '11 08:04 romanenko

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 ?

nilsine avatar Apr 16 '12 15:04 nilsine