muratguzel / letsrate

The best way to add rating capabilities to your rails application and your activerecord models.
http://letsrate.herokuapp.com
198 stars 234 forks source link

association names must be a Symbol #36

Closed andreortiz82 closed 10 years ago

andreortiz82 commented 11 years ago

Using Rails 4.0.0 - Could this be causing an error relating to association names?

rooshdi commented 11 years ago

+1

initabas commented 11 years ago

This helps me https://github.com/benmanns/letsrate/commit/0c4a2eba966fa10eb687bcce366bf75a6f9b8180

ghost commented 10 years ago

i have this problem too

alecslupu commented 10 years ago

+1

ghost commented 10 years ago

same problem... is there someone know how to do ? (4 month, and no answer... hum hum...) or maybe, is there someone know an other gem who can really work with rails 4 ?

devangb commented 10 years ago

+1

muratguzel commented 10 years ago

Hi .. For a long time, I have not enough time to mange this gem. But nowadays I'm available. You can check this issue 2-3 days later. Thanks ...

devangb commented 10 years ago

@muratguzel please inform as soon as you are done with this issue

muratguzel commented 10 years ago

@Devangtgr8 sure ...

murrekatt commented 10 years ago

Hi, I just ran into this problem as well and it looks like there are a few things that need updating for Rails 4. This is just the first problem it seems because when fixing this so that there is .to_sym for the associations I got new errors. I can send a pull request for that but as it is not solving everything I hesitate a bit. Also I do not know if it might be a problem with backwards compatibility.

Any ideas when there will be a Rails 4 compatible version of this plugin? Meanwhile I will look into the other problems I saw.

murrekatt commented 10 years ago

It looks like the other problems I ran into was fixed in master. I.e. the rate_controller didn't have current_user.id but rater current_user. I have it working now with Rails 4.

ghost commented 10 years ago

thanks murrekatt. But, could you, please, tell us what we can do for having it worked in rails 4 ?

murrekatt commented 10 years ago

@jerome2 look at the pull request and then also change current_user.id to current_user in rate_controller. That's what I did. A proper fix that is backwards compatible probably needs to be different.

ghost commented 10 years ago

i changed inside rater_controller.rb the curent_user.id by curent_user. But... i think to not understand the "pull request" (sorry, i'm newbie). So... because i not really understand, i can't resolve it.

could you please give me some more informations if possible to do it easy ? thanks a lot for give your time and be patient.

murrekatt commented 10 years ago

@jerome2 You just need to look at the changes made in the pull request https://github.com/murrekatt/letsrate/commit/c682fff6d7da8a13e7fd4a7324c36b4c44aa0e8e. I.e. the green lines with a + are the changes and the red lines with a - are the original lines. You want the green ones.

ghost commented 10 years ago

really good, excellent ! thanks a lot.

muratguzel commented 10 years ago

New version (1.0.9) is released with Rails 4 support ...