Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

acts_as_starrable

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

acts_as_starrable

  • 0.0.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

ActsAsStarrable

ActsAsStarrable is a Rails Engine that allows you to easily add ratings (stars) to your models. Being an engine, it's a full-service add-on, providing views and controllers with sane defaults that will work for most use cases. In cases where it won't work, these can be easily overridden.

To install ActsAsStarrable, add acts_as_starrable to your Gemfile and run bundle install.

The ratings model can be built by running the following:

rails g acts_as_starrable:migration
rake db:migrate

Ratings can be added to a model as follows:

class Foo < ActiveRecord::Base
  acts_as_starrable
end

Finally, use the stars helper method in your view to display the partial:

<%= stars(@foo) %>

ActsAsStarrable uses the RateIt jQuery plugin and conforms to the schema.org Rating and AggregateRating schemata for SEO goodness.

FAQs

Package last updated on 15 Jun 2014

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc