Sha256: ea848409f331f3f2cb6a8dacf3b2e29573db80c8a1cabd7f19432e299e7e8c54

Contents?: true

Size: 988 Bytes

Versions: 1

Compression:

Stored size: 988 Bytes

Contents

# 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](http://rateit.codeplex.com) jQuery plugin and conforms to the [schema.org](http://schema.org) [Rating](http://schema.org/Rating) and [AggregateRating](http://schema.org/AggregateRating) schemata for SEO goodness.

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
acts_as_starrable-0.0.2 README.md