mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
fix revision count and drop observers
This commit is contained in:
parent
518ecc3d4e
commit
b33e9ed28e
12 changed files with 69 additions and 34 deletions
11
app/models/concerns/revision_count.rb
Normal file
11
app/models/concerns/revision_count.rb
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
module RevisionCount
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
included do
|
||||
after_update :increment_revision
|
||||
end
|
||||
|
||||
def increment_revision
|
||||
conference.update_column(:revision, conference.revision + 1)
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue