New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added rerating options and fixed two bugs #47
Conversation
Hi, can you say me please, how can I set readonly option for specific rating_for field and make that user can rate only ones? |
Hi, @yozzz. If you are using my fork you can do it as follow: |
Sorry for question... you have two main folders generators and letsrate. From generators/letsrate/templates I copied two files as letsrate.js.coffee.erb and rater_controller.rb. In main folder letsrate you have files as helpers.rb, model.rb and version.rb , where I should put it with file letsrate.rb that requires them? After installing gem I don't see similar files. |
@yozzz you do not need to copy any file. Just install the gem as follow and use the helper in a way I mentioned above: |
Thought I can't install gem from fork repository, thanks. After command rails g letsrate user getting: |
@yozzz The changes I made mistakenly was only Ruby 2.0 compatible - I had used keyword arguments. I've just corrected it and now it should work with Ruby 1.9.* as well. You can reinstall and check it again. |
I will try it thank you! Is there some way in this gem output stars that |
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 ... |
@ElvinEfendi In your generator file you have copy_file 'letsrate.js.cofee.erb', 'app/assets/javascripts/letsrate.js.coffee.erb'. Coffee is mispelled, causing issues. |
@ericaBradford it seems like the issues I've targeted with this pull requests are already fixed without merging anyway. |
@ElvinEfendi How do we change data-disable-after-rate? I can't seem to find how to fix it... |
@ericaBradford when calling rating_for or rating_for_user method just set disable_after_rate: true check the helper methods' implementation for more info: https://github.com/muratguzel/letsrate/blob/master/lib/letsrate/helpers.rb |
@ElvinEfendi Thank you!!! |
@ElvinEfendi I don't know why, but it isn't working... |
Fixed bugs:
Rerating functionality:
Now developers can toggle between allowing rerating and no allowing but sending flag while calling letsrate_rateable method
Added documentation for using allow_rerating flag