开发者

ratings_for getting error in ajaxful_rating_jquery

开发者 https://www.devze.com 2023-03-29 20:16 出处:网络
in my post index view i am calling this and this error occur undefined method `singular_class_name\' for ActionController::RecordIdentifier:Module

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....

0

精彩评论

暂无评论...
验证码 换一张
取 消