Hi, I am using mongoid with rails 3 for my application. My problem is I have a task list where each task has checkbox to mark whether has it completed or not. For that I have written code like this
<%=check_box_tag 'task_is_complete', nil, nil, :onclick=>"complete('#{task.id}');" %><%=task.name%> On click I am doing ajax call to my controller def complete task=Task.where(params[:task_id]) puts task.inspect end But I am not able to fetch the task. My mongo db record is "{ "_id" : ObjectId("4d8818d1e138230a5f000007"), "name" : "Scraping", "project_id" : ObjectId("4d881886e138230a5f000003"), "due_date" : "Thu Mar 31 2011 05:30:00 GMT+0530 (IST)", "note" : "Scrape two vendors" }" Also, the value passed to controller i.e params[:task_id] has value "4d8818d1e138230a5f000007". Can anyone tell Am I missing anything? Thanks, MIke -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.