Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken revision count #1236

Closed
shlok007 opened this issue Jan 4, 2017 · 2 comments · Fixed by #1239
Closed

Broken revision count #1236

shlok007 opened this issue Jan 4, 2017 · 2 comments · Fixed by #1239

Comments

@shlok007
Copy link
Member

shlok007 commented Jan 4, 2017

I don't understand the intended behavior of revision_observer.rb .

It seems like it should increment revision column on every change of room , track , event and conference itself. If that's the case then then the count increments for the changes in conference model only and needs to be fixed.

@differentreality
Copy link
Contributor

Thanks for the issue @shlok007
Also Event, Room, Track do not have a relationship with Conference any more, they do with Program.
https://github.com/openSUSE/osem/blob/master/app/models/revision_observer.rb#L19

@shlok007
Copy link
Member Author

shlok007 commented Jan 4, 2017

I was thinking maybe we could drop observers. It was removed from core in Rails 4.0 . There hasn't been a version release since 2013 and hence, no support for rails 5 yet. See: rails/rails-observers#39

We could probably use Concerns instead
https://signalvnoise.com/posts/3372-put-chubby-models-on-a-diet-with-concerns

@shlok007 shlok007 changed the title Broken revision count [question] Broken revision count Feb 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants