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

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

Open
edla opened this issue Jul 21, 2010 · 6 comments
Open

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

edla opened this issue Jul 21, 2010 · 6 comments
Labels

Comments

@edla
Copy link

edla commented Jul 21, 2010

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
Copy link
Owner

edgarjs commented Jul 21, 2010

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

@sennor
Copy link

sennor commented Mar 13, 2011

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

@edgarjs
Copy link
Owner

edgarjs commented Mar 14, 2011

Not really, unless you stub somehow a guest user.

@sgreenfield
Copy link

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
Copy link

It would be great!

@nilsine
Copy link

nilsine commented Apr 16, 2012

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 ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants