edgarjs / ajaxful-rating

Provides a simple way to add rating functionality to your application.
http://rdoc.info/projects/edgarjs/ajaxful-rating
417 stars 127 forks source link

calling ajaxful_rating_style within a view file doesn't generate all the CSS #17

Open aukan opened 14 years ago

aukan commented 14 years ago

When you call <%= ajaxful_rating_style %> inside your layout file it works fine. But if I try calling it inside a view file like this:

<% content_for :header do %> <%= ajaxful_rating_style %> <% end %>

it doesn't work as expected. I can see in the README file that you do state it's necessary to put it into your layout file. Anyway I suggest you could call it within a view file, just the way I showed. That way you don't have to always include the CSS file in all the controllers and actions that use that layout.

In the meantime you should make more emphasis about this in the documentation because it took me a while to figure out why the helper method wasn't generating the dynamic part of the CSS.

PD: Great work

helmerj commented 14 years ago

Hi there,

same here. That part puzzled me for quite a while before I read a bout it here. Thanks for letting us know!!

Cheers Juergen

climbingblake commented 13 years ago

x2, in particular the CSS for .ajaxful-rating{... width ...

jspooner commented 13 years ago

In rails 3.1 you might want to just add that css into the asset pipeline.