
Security News
ESLint Adds Support for Parallel Linting, Closing 10-Year-Old Feature Request
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Star rating gem for Rails application using jQuery plugin jRating
Demo application, requires to sign up before rating.
Run :
$ rails g seems_rateable:uninstall_old
Then follow as instructed.
Add this line to your application's Gemfile:
gem 'seems_rateable'
And then execute:
$ bundle
Or install it yourself as:
$ gem install seems_rateable
Generate required files :
$ rails generate seems_rateable:install
And run :
$ rake db:migrate
To prepare model add seems_rateable
to your rateable model file. You can also pass a hash of dimensions
e.g :quality, :price
Post < ActiveRecord::Base
seems_rateable # :quality, :speed, :effectiveness
end
To track user's given rates add seems_rateable_rater
to your rater model.
User < ActiveRecord::Base
seems_rateable_rater
end
To display star rating use helper method rating_for
in your view
#show.html.erb
rating_for @post
rating_for @post, dimension: :quality, disabled: true, html_options
You can specify these options :
dimension
The dimension of the rating objectdisabled
Set to true to display static star rating meaning no user would be allowed to ratehtml_options
HTML options of the selectorTo edit the javascript options locate rateable.js file in app/assets/javascripts/rateable/
.
The javascript options are explained directly in the file.
In config/initializers/seems_rateable.rb you can configure these options :
User
, name of the model you put seems_rateable_rater
current_user
by defaultgit checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that seems_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
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.
Security News
Rspack launches Rslint, a fast TypeScript-first linter built on typescript-go, joining in on the trend of toolchains creating their own linters.