尝试使用Best In Place更新索引中的记录

我试图使用单独的jQuery或就地编辑器“Best In Place”来更新索引中的记录。 没有获得复选框并且在行上丢失格式。 我使用这个rails cast作为指南但是当我使用Ryan使用的复选框上的语法时,我得到一个错误说:

更新:Ruby 1.8.7

语法错误,意外’:’,期待’)’

码 –

application.js中:

 //= require jquery //= require jquery_ujs //= require_tree . //= require jquery.tablednd_0_5.js //= require jquery.tablesorter.js //= require jquery.purr //= require best_in_place 

评论,crb_agenda和pre_release_agenda咖啡脚本:

 jQuery -> $('.best_in_place').best_in_place() 

comments_controller.rb#更新

  def update @comment = Comment.find(params[:id]) respond_to do |format| if @comment.update_attributes(params[:comment]) Comment.add_comment_to_jira_ticket("MCTEST-293",@comment.user_comments) format.html { redirect_to @comment, :notice => 'Comment was successfully updated.' } format.json { head :ok } else format.html { render :action => "edit" } format.json { render :json => @comment.errors, :status => :unprocessable_entity } end end 

CRB议程index.html.erb与best_in_place帮助器一起达到td(是的,它是一团糟)

     crb_agenda.key).all %>  crb_agenda.key).order("updated_at DESC").first %> <tr class="" id="">  crb_agenda.key).where("`key` LIKE 'CR%'").where("due_date <= '#{@date_cutoff.to_s}'").each do |sub_key| @sub_tasks <  end

这涵盖了一切吗?

我们放弃了Best in Place并创造了我在这里描述的答案

Hide? Comments Sub-tasks Project name Change element Issue type Key Issue links Summary Assignee Reporter Dev Lead / Resource Mgr. Planned Rel. Dt Due Dt Approval Source SOX Dev QA SQE ST UX App QA Systest QA SQE Test Dependencies
:check_box, :collection => %w[No Yes] %>