-
Notifications
You must be signed in to change notification settings - Fork 3
Modèles d'événements #3701
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
Modèles d'événements #3701
Conversation
|
@pabois il manque les droits stp ! Les admins et les responsables de sites doivent pouvoir modifier les modèles. |
|
@pabois j'ai fait :) |
Co-authored-by: Sébastien Gaya <sebastien.gaya@gmail.com>
Co-authored-by: Sébastien Gaya <sebastien.gaya@gmail.com>
Co-authored-by: Sébastien Gaya <sebastien.gaya@gmail.com>
Co-authored-by: Sébastien Gaya <sebastien.gaya@gmail.com>
Co-authored-by: Sébastien Gaya <sebastien.gaya@gmail.com>
app/models/concerns/templatable.rb
Outdated
| raise "Object with id #{params[:template_id]} is not a template." unless self.template.is_template? | ||
| # Prevent stealing template from another instance | ||
| raise "Object with id #{params[:template_id]} is from a different instance." if self.template.university != current_university | ||
| template_record = self.class.unscoped.templates.where(university_id: current_university.id).find(params[:template_id]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
c'est cool ça !
| 'id', # The localization created is new | ||
| 'slug', # The slug will depend on the new title | ||
| 'created_at', # The creation date is not inherited | ||
| 'updated_at' # The update date is not inherited |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah oui très juste
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
et on a pas des updated_by_id?
No description provided.