fsword/apposs-center — Issue #47: 点击指令模板修改无反映，后台报错
Author: sdjcw
Created: 2011-11-07 03:34:12+00:00
State: open

升级到版本
commit 40d4aa73da629d41487eae3d20e5094be1838535
Author: fsword
Date: Thu Nov 3 14:03:18 2011 +0800

支持添加所有用户的指令模板(临时方案)
后，点击指令模板修改，前端页面没有反映，后台报错，日志如下：

Started GET "/apps/1/operation_templates/1/edit" for 127.0.0.1 at 2011-11-07 11:33:01 +0800
Processing by OperationTemplatesController#edit as JS
Parameters: {"app_id"=>"1", "id"=>"1"}
User Load (0.1ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = 1 LIMIT 1
OperationTemplate Load (0.2ms) SELECT `operation_templates`.* FROM `operation_templates` WHERE `operation_templates`.`id` = 1 LIMIT 1
DEPRECATION WARNING: Using form_for(:name, @resource) is deprecated. Please use form_for(@resource, :as => :name) instead. (called from _app_views_operation_templates__form_html_erb__2319413204490506751_42194460__1411437021345845957 at /home/shenfeng/workspaces/apposs/center/app/views/operation_templates/_form.html.erb:1)
DirectiveGroup Load (0.1ms) SELECT `directive_groups`.* FROM `directive_groups` WHERE `directive_groups`.`name` IN ('default', 'my_group')
DirectiveTemplate Load (0.1ms) SELECT `directive_templates`.* FROM `directive_templates` WHERE `directive_templates`.`id` IN (3)
Rendered operation_templates/_form.html.erb (130.6ms)
Rendered operation_templates/edit.js.erb (131.9ms)
Completed in 221ms

ActionView::Template::Error (undefined method `owner_id' for #):
30:

31:	<% resource.directive_templates do |d_template,checked| %>
32:

33: <%=draggable_item d_template,checked %>
34:

35:	<% end %>
36:

app/helpers/operation_templates_helper.rb:7:in `draggable_item'
app/views/operation_templates/_form.html.erb:33:in `block (2 levels) in _app_views_operation_templates__form_html_erb__2319413204490506751_42194460__1411437021345845957'
app/models/operation_template.rb:88:in `block in directive_templates'
app/models/operation_template.rb:86:in `each'
app/models/operation_template.rb:86:in `directive_templates'
app/views/operation_templates/_form.html.erb:31:in `block in _app_views_operation_templates__form_html_erb__2319413204490506751_42194460__1411437021345845957'
app/views/operation_templates/_form.html.erb:1:in `_app_views_operation_templates__form_html_erb__2319413204490506751_42194460__1411437021345845957'
app/views/operation_templates/edit.js.erb:1:in `_app_views_operation_templates_edit_js_erb___2394925379659288749_42229940__807305301835620130'

Rendered /home/shenfeng/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.0.6/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.0ms)
Rendered /home/shenfeng/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.0.6/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (3.6ms)
Rendered /home/shenfeng/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.0.6/lib/action_dispatch/middleware/templates/rescues/template_error.erb within rescues/layout (7.7ms)