petertoth / seems_rateable Goto Github PK
View Code? Open in Web Editor NEWStar rating gem for rails applications. Uses jRating jquery plugin.
License: MIT License
Star rating gem for rails applications. Uses jRating jquery plugin.
License: MIT License
I have added gem to Gemfile and then installed it. All migrations have been run as well.
When I include seems_rateable in Product Model, it throws this error -
/home/ubuntu/.rvm/gems/ruby-2.1.2/gems/activerecord-4.1.1/lib/active_record/dynamic_matchers.rb:26:in method_missing': undefined local variable or method
seems_rateable' for Product (call 'Product.connection' to establish a connection):Class (NameError)
from /var/www/marketplace/app/models/product.rb:23:in <class:Product>' from /var/www/marketplace/app/models/product.rb:1:in
<top (required)>'
Any pointers on what I am missing?
I am using Rails 4.1.1
Thanks for this gem.
However, I'm having problems in making it work with Rails 3.2.x.
When loading an object with seems_rateable from database:
ArgumentError: wrong number of arguments (3 for 2)
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.16/lib/active_record/associations.rb:1197:in `has_many'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/seems_rateable-1.0.12/lib/seems_rateable/model.rb:84:in `seems_rateable'
from .../rails/sti_test/app/models/vehicle.rb:4:in `<class:Vehicle>'
from .../rails/sti_test/app/models/vehicle.rb:1:in `<top (required)>'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.16/lib/active_support/dependencies.rb:469:in `load'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.16/lib/active_support/dependencies.rb:469:in `block in load_file'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.16/lib/active_support/dependencies.rb:639:in `new_constants_in'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.16/lib/active_support/dependencies.rb:468:in `load_file'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.16/lib/active_support/dependencies.rb:353:in `require_or_load'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.16/lib/active_support/dependencies.rb:502:in `load_missing_constant'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.16/lib/active_support/dependencies.rb:192:in `block in const_missing'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.16/lib/active_support/dependencies.rb:190:in `each'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.16/lib/active_support/dependencies.rb:190:in `const_missing'
from (irb):1
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.16/lib/rails/commands/console.rb:47:in `start'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.16/lib/rails/commands/console.rb:8:in `start'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.16/lib/rails/commands.rb:41:in `<top (required)>'
from .../rails/sti_test/script/rails:6:in `require'
from .../sti_test/script/rails:6:in `<top (required)>'
from -e:1:in `load'
from -e:1:in `<main>'
I already implemented a fix, so a pull request will follow.
There are no spec files in the repo. Are there any spec tests available?
obj = eval "#{params[:kls]}.find(#{params[:idBox]})" rescue nil
Huge LOL dude
I have inserted <%= rating_for c, dimension: :crating %> in a view (c is a comment), and it's not showing up. I do get this in the code:
I tried another gem and I had a problem - the stars were not showing(image thumbnails instead). - Saying this maybe it's a clue. (Rails 4.2.0beta4, Ruby 2.0.0p195)
Otherwise, keep up the good work! I'm a fan! Maybe we'll have a chat some day about "changing the world."
When I use seems_rateable
in my model and run rails c
command and try to manipulated this model, a warning appears. I'm using rails 4 e ruby 2.
DEPRECATION WARNING: The following options in your Question.has_many :rates_without_dimension
declaration are deprecated: :conditions. Please use a scope block instead. For example, the following:
has_many :spam_comments, conditions: { spam: true }, class_name: 'Comment'
It's a great gem, it's working fine. But i am using it in a form more precisely in a New Post Form, there i am able to rate it. But what i want is to display those rating in my show action how would i do it. ? ii tried but not working please help me ASAP
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.