什么是Spree Deface :: Override:原始关键字?

时间:2013-07-31 07:13:33

标签: ruby-on-rails ruby spree

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代表什么?

感谢。

1 个答案:

答案 0 :(得分: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.

有关完整的自述文件,请转到https://github.com/spree/deface

希望它会有所帮助。感谢。