0

I am fairly new to rails and Jquery and am looking for some guidance on which libraries I should keep and which one I don't need.

Anyway currently I have the following in my javascript library

admin.js.coffee 
application.js  
bootstrap-alert.js  
calendar.js 
documents.js.coffee 
folders.js.coffee   
fullcalendar.js
gcal.js 
jquery-1.7.min.js   
jquery-ui-1.8.9.custom.min.js   
jquery-ui.js    
jquery-ui.min.js    
jquery.bookshelfslider.js   
jquery.bookshelfslider.min.js   
jquery.easing.1.3.js    
jquery.js   
jquery.rest.js  
jquery.ticker.js    
jquery_ujs.js   
rails.js    
site.js 
stickybar.jquery.min.js
stickysidebar.jquery.js 
turn.js

My application.js file looks like this

 //= require jquery
 //= require jquery-ui
//= require jquery_ujs
//= require twitter/bootstrap
//= require_tree .

Is there anything anyone can see that would cause me any issues? if I am calling a library within application.js, do I need the library in my Javascript directory?

Any advice appreciated

4

1 回答 1

1

rails.js是 的旧名称jquery_ujs.js。您可以删除前者。

此外,您不需要将以下文件存储在 javascripts 目录中

jquery-1.7.min.js   
jquery-ui-1.8.9.custom.min.js   
jquery-ui.js    
jquery-ui.min.js    
jquery.js
rails.js

只需安装jquery-rails gem。

有关更多信息,请参阅Rails 3.1 资产管道指南

于 2012-04-26T09:53:22.870 回答