Skip to content
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

Improve usage in README #2

Open
ryanoff opened this issue May 22, 2012 · 0 comments
Open

Improve usage in README #2

ryanoff opened this issue May 22, 2012 · 0 comments

Comments

@ryanoff
Copy link

ryanoff commented May 22, 2012

Can you please improve the Usage area in the Readme file?

I believe for Rails 3.1 by default it uses Coffeescript and SCSS.

For example, if our controller is called Projects:

In projects.js.coffee, add the line
//= require jquery-star-rating

In projects.css.scss, add the line
/*
*= require jquery-star-rating
*/

In our view (e.g. new.html.erb) add the "star" class to your radio buttons:
<%= f.label :rating, "Rating" %>
<%= f.radio_button :rating, "1", :class => "star" %>
<%= f.radio_button :rating, "2", :class => "star" %>
<%= f.radio_button :rating, "3", :class => "star" %>
<%= f.radio_button :rating, "4", :class => "star" %>
<%= f.radio_button :rating, "5", :class => "star" %>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant