reordering causes ActionView::MissingTemplate error
aspiers opened this issue · 4 comments
aspiers commented
After dragging and dropping to change the order, the plugin tries to render the "#{controller}/reorder" view. There is nothing in the instructions about creating this view, and in many cases the only reason for creating it would be to avoid this error, which is not ideal.
scambra commented
View is in frontends/default/views directory, you don't need to create unless you want to override something
Which versions of active_scaffold_sortable, active_scaffold and rails?
aspiers commented
rails 3.1.3, active_scaffold 3.1.13, active_scaffold_sortable 3.1.0
Started POST "/admin/roles/reorder?as_admin__roles-tbody%5B%5D=9&as_admin__roles-tbody%5B%5D=1&as_admin__roles-tbody%5B%5D=6&as_admin__roles-tbody%5B%5D=7&as_admin__roles-tbody%5B%5D=10&as_admin__roles-tbody%5B%5D=13&as_admin__roles-tbody%5B%5D=12&as_admin__roles-tbody%5B%5D=11&as_admin__roles-tbody%5B%5D=3&as_admin__roles-tbody%5B%5D=2&as_admin__roles-tbody%5B%5D=4&as_admin__roles-tbody%5B%5D=14&as_admin__roles-tbody%5B%5D=5&as_admin__roles-tbody%5B%5D=8&authenticity_token=authenticity_token" for 10.70.61.74 at 2012-01-12 12:39:45 +0000
Processing by Admin::RolesController#reorder as */*
Parameters: {"as_admin__roles-tbody"=>["9", "1", "6", "7", "10", "13", "12", "11", "3", "2", "4", "14", "5", "8"], "authenticity_token"=>"authenticity_token"}
SQL (73.7ms) UPDATE `roles` SET `position` = 1 WHERE `roles`.`id` = 9
SQL (49.2ms) UPDATE `roles` SET `position` = 2 WHERE `roles`.`id` = 1
SQL (65.7ms) UPDATE `roles` SET `position` = 3 WHERE `roles`.`id` = 6
SQL (64.0ms) UPDATE `roles` SET `position` = 4 WHERE `roles`.`id` = 7
SQL (56.7ms) UPDATE `roles` SET `position` = 5 WHERE `roles`.`id` = 10
SQL (65.5ms) UPDATE `roles` SET `position` = 6 WHERE `roles`.`id` = 13
SQL (42.7ms) UPDATE `roles` SET `position` = 7 WHERE `roles`.`id` = 12
SQL (73.9ms) UPDATE `roles` SET `position` = 8 WHERE `roles`.`id` = 11
SQL (57.4ms) UPDATE `roles` SET `position` = 9 WHERE `roles`.`id` = 3
SQL (65.6ms) UPDATE `roles` SET `position` = 10 WHERE `roles`.`id` = 2
SQL (57.4ms) UPDATE `roles` SET `position` = 11 WHERE `roles`.`id` = 4
SQL (65.5ms) UPDATE `roles` SET `position` = 12 WHERE `roles`.`id` = 14
SQL (46.7ms) UPDATE `roles` SET `position` = 13 WHERE `roles`.`id` = 5
SQL (73.5ms) UPDATE `roles` SET `position` = 14 WHERE `roles`.`id` = 8
Completed 500 Internal Server Error in 1052ms
ActionView::MissingTemplate (Missing template admin/roles/reorder, application/reorder, active_scaffold_overrides/reorder, /reorder with {:handlers=>[:erb, :builder, :haml], :formats=>[:html, :text, :js, :css, :ics, :csv, :xml, :rss, :atom, :yaml, :multipart_form, :url_encoded_form, :json], :locale=>[:en, :en]}. Searched in:
* "/data/music/RotC/eventbook/app/views"
* "/home/adam/.rvm/gems/ruby-1.9.3-p0@rails-3.1/gems/active_scaffold_sortable-3.1.0/frontends/default/views"
* "/home/adam/.rvm/gems/ruby-1.9.3-p0@rails-3.1/gems/active_scaffold-3.1.13/frontends/default/views"
):
config/initializers/quiet_assets.rb:6:in `call_with_quiet_assets'
Rendered /home/adam/.rvm/gems/ruby-1.9.3-p0@rails-3.1/gems/actionpack-3.1.3/lib/action_dispatch/middleware/templates/rescues/missing_template.erb within rescues/layout (0.8ms)
scambra commented
Templates were rjs and they must be changed to erb for rails 3.1
I'm working in changing them
scambra commented
Fixed in 3.1.1