Class: Actions::Katello::ContentView::RemoveVersion
- Inherits:
-
EntryAction
- Object
- EntryAction
- Actions::Katello::ContentView::RemoveVersion
- Defined in:
- app/lib/actions/katello/content_view/remove_version.rb
Instance Method Summary collapse
Instance Method Details
#finalize ⇒ Object
18 19 20 21 22 |
# File 'app/lib/actions/katello/content_view/remove_version.rb', line 18 def finalize history = ::Katello::ContentViewHistory.find(input[:history_id]) history.status = ::Katello::ContentViewHistory::SUCCESSFUL history.save! end |
#humanized_name ⇒ Object
24 25 26 |
# File 'app/lib/actions/katello/content_view/remove_version.rb', line 24 def humanized_name _("Remove Version") end |
#plan(version) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'app/lib/actions/katello/content_view/remove_version.rb', line 5 def plan(version) action_subject(version.content_view) version.validate_destroyable! history = ::Katello::ContentViewHistory.create!(:content_view_version => version, :user => ::User.current.login, :status => ::Katello::ContentViewHistory::IN_PROGRESS, :task => self.task) plan_action(ContentViewVersion::Destroy, version) plan_self(history_id: history.id) end |