edgarjs / ajaxful-rating

Provides a simple way to add rating functionality to your application.

Home Page:http://rdoc.info/projects/edgarjs/ajaxful-rating

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MissingRateRoute error - the other solutions all done

RichardJordan opened this issue · comments

I have checked the other issues with MissingRateRoute errors and I am compliant with all results.

Users are raters and rateable. The user controller reads:

def rate
@user = @object_to_be_rated
@user.rate(params[:stars], @winner.user, params[:dimension])
#AJAX page building
render :update do |page|
page.replace_html @user.wrapper_dom_id(params), ratings_for(@user, params.merge(:wrap => false))
page.visual_effect :highlight, @user.wrapper_dom_id(params)
end
end

The routes.rb has the line:

map.resources :users, :member => {:rate => :post}

The view shows:

<%= ratings_for @object_to_be_rated, @current_user, :show_user_rating => true, :wrap => false, :allow_update => true, :dimension => :seller_rating, :method => :post %>

I am ready to give up. Cannot fathom what else to do...

Perhaps share a stripped down version here on git, I could look into it.

I think this is related to #41