Rails 3.1 and jquery-ui assets

后端 未结 8 1820
小鲜肉
小鲜肉 2020-12-02 05:10

This was asked in another question, but none of the solutions appear to work for me in 3.1rc1.

I\'m trying to use the new assets stuff in rails 3.1 - I have the file

8条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-02 05:25

    Example of a working setup:

        $ cat app/assets/javascripts/application.js
    
        //= require jquery
        //= require jquery-ui
    
    
        $ cat app/assets/stylesheets/application.css
    
        /*
         *= require vendor
         *
         */
    
    
        $ cat vendor/assets/stylesheets/vendor.css
    
        /*
         *= require_tree ./jquery_ui 
         *
         */
    
        vendor/assets/ $ tree
         stylesheets
             vendor.css
                 jquery_ui
                          jquery-ui-1.8.13.custom.css
                          ...
         images
            jquery_ui
                ui-bg_flat_0_aaaaaa_40x100.png
                ...
    

    Finally run this command:

        vendor/assets/images $ ln -s jquery_ui/ images
    

    Enjoy your jQuery UI

提交回复
热议问题