Class: Integral::Version
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Integral::Version
- Includes:
- PaperTrail::VersionConcern
- Defined in:
- app/models/integral/version.rb
Overview
Base Version class Version < PaperTrail::Version
Direct Known Subclasses
CategoryVersion, ListVersion, PageVersion, PostVersion, Storage::FileVersion, UserVersion
Class Method Summary collapse
-
.available_actions ⇒ Array
Available version actions.
-
.available_objects ⇒ Array
Available version objects.
Methods inherited from ApplicationRecord
Class Method Details
.available_actions ⇒ Array
Returns available version actions.
10 11 12 13 14 15 16 17 18 |
# File 'app/models/integral/version.rb', line 10 def self.available_actions available = [] %w[update create destroy publish].each do |item| available << [I18n.t("integral.actions.#{item}"), item] end available end |
.available_objects ⇒ Array
Returns available version objects.
21 22 23 24 25 26 27 28 29 |
# File 'app/models/integral/version.rb', line 21 def self.available_objects available = [] ActsAsIntegral.tracked_classes.each do |item| available << [item.model_name.human, item] end available end |