Ruby on rails 什么是Spree Deface::Override:原始关键字?
在Ruby on rails 什么是Spree Deface::Override:原始关键字?,ruby-on-rails,ruby,spree,Ruby On Rails,Ruby,Spree,在SpreeDeface::Override原始关键字用于什么?我不是从一开始就在开发一个应用程序,我在这里被一个代码打动了: Deface::Override.new(:virtual_path => "....", :name => "admin_user_acct_sales_row", :insert_bottom => "[data-hook='admin_users_index_rows'], #
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
代表什么
谢谢。我在
spree/deface自述文件中找到了以下内容
: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.
有关完整的自述,请转到
希望这会有帮助。谢谢