Comments (4)
Comment by igorlebovic
Wednesday Nov 28, 2012 at 18:40 GMT
Having the same issue. Any guidance would be highly appreciated.
from ratyrate.
Comment by uorji3
Wednesday Nov 28, 2012 at 18:50 GMT
Igor,
I decided to scrap the 5 star rating and go with a simple like/dislike rating.
I'm using the act-as-votable gem.
It's a simpler design but all of my Jquery stays in tact.
from ratyrate.
Comment by Balaraju
Wednesday Mar 06, 2013 at 12:07 GMT
Having The Same issue
from ratyrate.
Comment by victorcreed
Thursday Apr 11, 2013 at 16:58 GMT
I resolved this problem like this
$.fn.raty.defaults.path = "/assets";
$.fn.raty.defaults.half_show = true;
window.applyRaty = function(){
$(".star").raty({
score: function(){
return $(this).attr('data-rating')
},
number: function() {
return $(this).attr('data-star-count')
},
click: function(score, evt) {
$.post('<%= Rails.application.class.routes.url_helpers.rate_path %>',
{
score: score,
dimension: $(this).attr('data-dimension'),
id: $(this).attr('data-id'),
klass: $(this).attr('data-classname')
},
function(data) {
if(data) {
// success code goes here ...
}
});
}
});
}
$(function(){
applyRaty();
});
then call applyRaty() in *.js.erb
from ratyrate.
Related Issues (20)
- Multiple dimension with same name
- Unable to Edit Current users Rating
- not recording average tables HOT 1
- Allow multiple entities to rate
- how can i change the hint messages dynamically.
- authentication issue HOT 4
- Display the most recent rating
- Does not work on Rails 5.1.4 - Migrations made for Rails 4.2 HOT 3
- Can't submit a new PR. Can you help please? HOT 3
- Misplaced files
- ArgumentError: Index name 'index_rates_on_rater_id' on table 'rates' already exists HOT 2
- Bug when save the rating in database
- undefined method `overall_avg' for #<Recipe::ActiveRecord_Relation:0x007f5154d4ea20> HOT 1
- Can't make users rate another model
- Stars not showing in bootstrap modal HOT 2
- ratyrate and devise
- Database Migration Error HOT 1
- Ratyrate on same line
- ActionController::RoutingError (No route matches [POST]
- Show last rating instead of average.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ratyrate.