<% case ActiveScaffold.js_framework %>
<% when :jquery %>
<% require_asset "getprototypeof" %>
<% if Jquery::Rails.const_defined? 'JQUERY_UI_VERSION' %>
<% require_asset "jquery-ui" %>
<% require_asset "jquery-ui-timepicker-addon" %>
<% elsif Jquery.const_defined? 'Ui' %>
<% require_asset "jquery.ui.core" %>
<% require_asset "jquery.ui.sortable" %>
<% require_asset "jquery.ui.draggable" %>
<% require_asset "jquery.ui.datepicker" %>
<% require_asset "jquery-ui-timepicker-addon" %>
<% end %>
<% require_asset "jquery/active_scaffold" %>
<% require_asset "jquery/jquery.editinplace" %>
<% require_asset "jquery/date_picker_bridge" %>
<% require_asset "jquery/draggable_lists" %>
<% when :prototype %>
<% require_asset "effects" %>
<% require_asset "controls" %>
<% require_asset "prototype/active_scaffold" %>
<% require_asset "prototype/dhtml_history" %>
<% require_asset "prototype/form_enhancements" %>
<% require_asset "prototype/rico_corner" %>
<% end %>
ActiveScaffold.config = <%= ActiveScaffold.js_config.to_json %>;
<% ActiveScaffold.javascripts.each {|js| require_asset js} %>
<% ActiveScaffold::Bridges.all_javascripts.each {|js| require_asset js} %>

<% case ActiveScaffold.js_framework %>
<% when :jquery %>
<% require_asset "getprototypeof" %>
<% if Jquery::Rails.const_defined? 'JQUERY_UI_VERSION' %>
<% require_asset "jquery-ui" %>
<% require_asset "jquery-ui-timepicker-addon" %>
<% elsif Jquery.const_defined? 'Ui' %>
<% require_asset "jquery.ui.core" %>
<% require_asset "jquery.ui.sortable" %>
<% require_asset "jquery.ui.draggable" %>
<% require_asset "jquery.ui.droppable" %>
<% require_asset "jquery.ui.datepicker" %>
<% require_asset "jquery-ui-timepicker-addon" %>
<% end %>
<% require_asset "jquery/active_scaffold" %>
<% require_asset "jquery/jquery.editinplace" %>
<% require_asset "jquery/date_picker_bridge" %>
<% require_asset "jquery/draggable_lists" %>
<% when :prototype %>
<% require_asset "effects" %>
<% require_asset "controls" %>
<% require_asset "prototype/active_scaffold" %>
<% require_asset "prototype/dhtml_history" %>
<% require_asset "prototype/form_enhancements" %>
<% require_asset "prototype/rico_corner" %>
<% end %>
ActiveScaffold.config = <%= ActiveScaffold.js_config.to_json %>;
<% ActiveScaffold.javascripts.each {|js| require_asset js} %>
<% ActiveScaffold::Bridges.all_javascripts.each {|js| require_asset js} %>

Fix draggable for jquery-rails 3 gem
Fix draggable for jquery-rails 3 gem
