Module: Cms::Behaviors::Versioning::ClassMethods
- Defined in:
- lib/cms/behaviors/versioning.rb
Instance Method Summary collapse
- #version_class ⇒ Object
- #version_class_name ⇒ Object
- #version_foreign_key ⇒ Object
- #version_table_name ⇒ Object
- #versioned_columns ⇒ Object
Instance Method Details
#version_class ⇒ Object
50 51 52 |
# File 'lib/cms/behaviors/versioning.rb', line 50 def version_class const_get "Version" end |
#version_class_name ⇒ Object
54 55 56 |
# File 'lib/cms/behaviors/versioning.rb', line 54 def version_class_name "#{name}::Version" end |
#version_foreign_key ⇒ Object
58 59 60 |
# File 'lib/cms/behaviors/versioning.rb', line 58 def version_foreign_key @version_foreign_key end |
#version_table_name ⇒ Object
62 63 64 |
# File 'lib/cms/behaviors/versioning.rb', line 62 def version_table_name @version_table_name end |
#versioned_columns ⇒ Object
66 67 68 69 |
# File 'lib/cms/behaviors/versioning.rb', line 66 def versioned_columns @versioned_columns ||= (version_class.new.attributes.keys - (%w[id lock_version position version_comment created_at updated_at created_by_id updated_by_id type] + [version_foreign_key])) end |