Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Clean, powerful, customizable, simple, configurable, gem for displaying and handling ratings, likes, and feedbacks for ActiveRecord model. People!!! Please provide your feedbacks what functionality to add on the issues page. I'm open to whatever questions for improving this gem.
Add this line to your application's Gemfile:
gem 'self_rateable'
And then execute:
$ bundle
Or install it yourself as:
$ gem install self_rateable
Make you ActiveRecord model self rateable:
The default type is :likes
class Model < ActiveRecord::Base
self_rateable by: :class_name_of_AR_model_that_can_rate
end
Rates philosophy as in facebook & vk (like/unlike)
class Model < ActiveRecord::Base
self_rateable by: :class_name_of_AR_model_that_can_rate, type: :likes
end
Rate:
object.like object_of_AR_model_that_can_rate
Stars rates diapasone 1..5 (as on movies)
class Model < ActiveRecord::Base
self_rateable by: :class_name_of_AR_model_that_can_rate, type: :stars
end
Rate:
object.rate object_of_AR_model_that_can_rate, count_of_stars
Rates philosophy as in stackoverflow (+1 vs -1)
class Model < ActiveRecord::Base
self_rateable by: :class_name_of_AR_model_that_can_rate, type: :points
end
Rate:
object.vote object_of_AR_model_that_can_rate, bool
This vote method returns false if object_of_AR_model_that_can_rate has already voted once. You can capture that output to show some messages.
(If true it adds 1 point if false it decreases 1 point)
Run rake task to prepare and update your database:
rake self_rateable
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that self_rateable demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.