in my post index view i am calling this and this error occur
undefined method `singular_class_name' for ActionController::RecordIdentifier:Module
Extracted source (around line #20):
17: <%= post.name %>
18: <%= post.description %>
19: <%#=debugger%>
20: <%= ratings_for post, :static, :small => true, :dimension => :speed %>
21: <%#= ratings_for post, :static, :small => true, :dimension => :beauty %>
22: 开发者_StackOverflow中文版 <%#= ratings_for post, :static, :small => true, :dimension => :price %>
23: <%= link_to 'Show', post if can? :show ,post %>
I fixed it by place following in gem:
gem 'ajaxful_rating', '3.0.0.beta6'
then bundle:update
my routes:
Contest::Application.routes.draw do |map|
map.resources :users, :member => {:rate => :post} do |nested| nested.resources :posts end
But seems like :stars option is not properly working(5 stars always even I want to display 10 stars)
Try it.
I fixed it by place following in gem: gem 'ajaxful_rating', '3.0.0.beta6'
then bundle:update
my routes:
Contest::Application.routes.draw do |map|
map.resources :users, :member => {:rate => :post} do
|nested| nested.resources :posts
end
Try please....
精彩评论