Class: LcpRuby::Pages::ChangeHandler
- Inherits:
-
Object
- Object
- LcpRuby::Pages::ChangeHandler
- Defined in:
- lib/lcp_ruby/pages/change_handler.rb
Class Method Summary collapse
Class Method Details
.install!(model_class) ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/lcp_ruby/pages/change_handler.rb', line 4 def self.install!(model_class) name_field = LcpRuby.configuration.page_model_fields[:name].to_s model_class.after_commit do |record| page_name = record.public_send(name_field) Registry.reload!(page_name) Resolver.clear! end end |