ruby-on-rails
  • ruby
  • spree
  • 2013-07-31 67 views 3 likes 
    3

    SpreeDeface::Override什麼是:原始關鍵字用於?我從一開始工作的一個應用程序不是和我在這裏代碼來襲:什麼是Spree Deface :: Override:原始關鍵字?

    Deface::Override.new(:virtual_path => "....", 
           :name => "admin_user_acct_sales_row", 
    
           :insert_bottom => "[data-hook='admin_users_index_rows'], #admin_users_index_rows[data-hook]", 
    
           :partial => "spree/admin/users/...", 
    
           :original => "90406d8cbc733e601bb9717b4b5711e43fe181a3", 
    
           :disabled => false) 
    

    這裏:original代表什麼呢?

    謝謝。

    回答

    5

    繼我在spree/deface README

    :original - String containing original markup that is being overridden. 
          If supplied Deface will log when the original markup changes, 
          which helps highlight overrides that need attention when 
          upgrading versions of the source application. Only really 
          warranted for :replace overrides. NB: All whitespace is stripped 
          before comparison. 
    

    有關完整的README發現,去https://github.com/spree/deface

    希望這將有助於。謝謝。

    相關問題