Class: Pulitzer::PostsController::PreviewRebuilder
- Inherits:
-
Object
- Object
- Pulitzer::PostsController::PreviewRebuilder
- Defined in:
- app/interactions/pulitzer/posts_controller/preview_rebuilder.rb
Instance Attribute Summary collapse
-
#processing_version ⇒ Object
Returns the value of attribute processing_version.
Instance Method Summary collapse
-
#initialize(post) ⇒ PreviewRebuilder
constructor
A new instance of PreviewRebuilder.
- #rebuild ⇒ Object
Constructor Details
#initialize(post) ⇒ PreviewRebuilder
Returns a new instance of PreviewRebuilder.
4 5 6 |
# File 'app/interactions/pulitzer/posts_controller/preview_rebuilder.rb', line 4 def initialize(post) @post = post end |
Instance Attribute Details
#processing_version ⇒ Object
Returns the value of attribute processing_version.
2 3 4 |
# File 'app/interactions/pulitzer/posts_controller/preview_rebuilder.rb', line 2 def processing_version @processing_version end |
Instance Method Details
#rebuild ⇒ Object
8 9 10 11 12 |
# File 'app/interactions/pulitzer/posts_controller/preview_rebuilder.rb', line 8 def rebuild @processing_version = @post.create_processing_version Pulitzer::CloneVersionJob.perform_later(@post.active_version) instance_eval(&Pulitzer.publish_callback) unless Pulitzer.skip_publish_callback? end |