ruby on rails - Using best_in_place gem in 2 level nested controllers: [Raven] User excluded error: #<ActiveRecord::RecordNotFound -


i use gem best in place editing discussion topics , comments... works discussion comments gives record not found error: routes:
namespace :school resource :account, :except => [:new, :create, :destroy], :controller => 'account' resources :classes, :path => "" resources :discussions resources :comments end end end

show.html.haml (discussion)

  = best_in_place @discussion, :name, :type => :textarea, :path => school_class_discussion_path   = best_in_place c, :body, :type => :textarea , :path =>school_class_discussion_comment_path(params[:class_id], @discussion) 

discussion_controler.rb

def update   @discussion.update_attributes(params[:discussion])   respond_with @discussion end 

comments_controller.rb

def update   @comment = comment.find(params[:id])   @comment.update_attributes(params[:comment])  respond_with @comment , :location => school_class_discussion_comment_path(params[:class_id], @discussion)) end 

i can click on comments , edit not update :( log error:
[raven] user excluded error:activerecord::recordnotfound comment id = actually gives discussion id

could maybe show show contorller action discussion?

i guess might solve problem:

= best_in_place @discussion, :name, :type => :textarea, :path => school_class_discussion_path(params[:class_id], @discussion) = best_in_place c, :body, :type => :textarea , :path =>school_class_discussion_comment_path(params[:class_id], @discussion, c) 

Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -