Skip to content

Commit

Permalink
stars number - bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
muratguzel committed Sep 6, 2012
1 parent a65499e commit 2055c9a
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions lib/rateit/helpers.rb
Expand Up @@ -12,15 +12,14 @@ def rating_for(rateable_obj, dimension=nil, options={})
else
avg = klass.avg
end

if options[:start].present?
content_tag :div, "", "data-dimension" => dimension, :class => "star", "data-rating" => avg,
"data-id" => rateable_obj.id, "data-classname" => rateable_obj.class.name,
"data-star-count" => options[:star]
else
content_tag :div, "", "data-dimension" => dimension, :class => "star", "data-rating" => avg,
"data-id" => rateable_obj.id, "data-classname" => rateable_obj.class.name
end

star = options[:star] || 5

content_tag :div, "", "data-dimension" => dimension, :class => "star", "data-rating" => avg,
"data-id" => rateable_obj.id, "data-classname" => rateable_obj.class.name,
"data-star-count" => star


end

end
Expand Down

0 comments on commit 2055c9a

Please sign in to comment.