Skip to content
Snippets Groups Projects
Unverified Commit 23f231a3 authored by Sébastien Gaya's avatar Sébastien Gaya
Browse files

fix accessibility with blocks

parent d82ac489
No related branches found
No related tags found
No related merge requests found
......@@ -57,6 +57,10 @@ class Communication::Extranet::Post < ApplicationRecord
protected
def check_accessibility
accessibility_merge_array blocks
end
def slug_unavailable?(slug)
self.class.unscoped
.where(extranet_id: self.extranet_id, slug: slug)
......
......@@ -154,6 +154,10 @@ class Communication::Website::Agenda::Event < ApplicationRecord
protected
def check_accessibility
accessibility_merge_array blocks
end
def to_day_after_from_day
errors.add(:to_day, :too_soon) if to_day.present? && to_day < from_day
end
......
......@@ -200,6 +200,10 @@ class Education::Program < ApplicationRecord
protected
def check_accessibility
accessibility_merge_array blocks
end
def last_ordered_element
university.education_programs.where(parent_id: parent_id).ordered.last
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment