views:

42

answers:

1

Hi All,

Trying my luck with the vote_fu rails plugin. The functionality looks like exactly what I need for a project of mine, but I have hit a roadblock. I have followed the github readme to the letter, installing it as a plugin.

I have put acts_as_voteable on my "Event" model and acts_as_voter on my User model. In the console, when I try:

>> event.votes

or

>> user.votes 

it successfully returns an empty array.

but when I try to do the following:

user.vote_for(event)

I get

"NoMethodError: undefined method `user_id' for #<Vote:0x7f5ed4355540>"

Any ideas? I'm probably just missing something obvious, but maybe something is missing from the plugin's readme.

Thanks.

[Update]

I created a blank application and the plugin works fine, so I think that this problem might be being caused by the use of the "desert" plugin, as my User class is split over two files. If I find the answer, I'll post it so that in the off chance someone else runs into this it may be some help.

Cheers.

A: 

Ok, I haven't found a definitive reason why this problem occurred, but I do have strong suspicions that it is due to the use of the "desert" plugin, as my User class is split over two files (the project is using the CommunityEngine plugin as a base),

Anyhow, I found a work around (something I should have tried before posting here). Instead of installing vote_fu as a plugin, I installed it as a gem. And now vote_fu seems to be humming along nicely.

So let that be a lesson to you all!

:-P

zizee