jquery - Rails ajax call returns 500 -


i have got ajax call deletes data database. data deleted properly, action returns failure ...

code looks this:

def remove_user_from_group   @usergroup = usergroup.find params[:usergroup_id]   @user = user.find params[:user_id]   @usergroup.users.delete(@user)   if @usergroup.save     flash[:notice] = t("flash.deleted")     render :add_user_to_group   else     flash[:notice] = t("flash.login_failed_nouser")     render :add_user_to_group   end end 

whats going wrong? same adding data , works fine.


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -