Class: Actions::Middleware::AutoPublishContext
- Inherits:
-
Dynflow::Middleware
- Object
- Dynflow::Middleware
- Actions::Middleware::AutoPublishContext
- Defined in:
- app/lib/actions/middleware/auto_publish_context.rb
Instance Method Summary collapse
Instance Method Details
#plan(*args) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'app/lib/actions/middleware/auto_publish_context.rb', line 4 def plan(*args) pass(*args).tap do resource = args.first case resource when ::Katello::ContentView action.input[:auto_publish_content_view_id] = resource.id when ::Katello::ContentViewVersion action.input[:auto_publish_content_view_id] = resource.content_view_id else fail "Can't determine auto publish content view from #{resource.class}" end end end |