wazery / ratyrate

:star: A Ruby Gem that wraps the functionality of jQuery Raty library, and provides optional IMDB style rating.

Home Page:http://ratingmoviestore.herokuapp.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

half stars not being saved

sunwooz opened this issue · comments

= rating_for @GAMe, "rating", enable_half: true, half_show: true, star_path: '/images/ratyrate'

I set the options enable_half and half_show to true but it doesn't seem to save the half stars and instead opts to round down to 3 when i select 3.5

Anyone else having the same problem?

SQL (0.3ms)  INSERT INTO "rates" ("rateable_id", "rateable_type", "dimension", "stars", "rater_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"  [["rateable_id", 3], ["rateable_type", "Game"], ["dimension", "rating"], ["stars", 3.21484375], ["rater_id", 1], ["created_at", "2016-05-23 16:58:44.522456"], ["updated_at", "2016-05-23 16:58:44.522456"]]
   (0.3ms)  COMMIT

Nevermind, it fixed itself somehow.