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
Post a Comment