Skip to content
Extraits de code Groupes Projets
Valider 6a786a16 rédigé par echarp's avatar echarp
Parcourir les fichiers

Les événements globaux sont affichés pour toutes les régions

parent 2b9d59b2
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -26,8 +26,8 @@ class Event < ActiveRecord::Base ...@@ -26,8 +26,8 @@ class Event < ActiveRecord::Base
"#{year}-#{month.to_i-1}-23", "#{year}-#{month.to_i-1}-23",
"#{month == '12' ? year.to_i+1 : year}-#{month == '12' ? 1 : month.to_i+1}-7" "#{month == '12' ? year.to_i+1 : year}-#{month == '12' ? 1 : month.to_i+1}-7"
} }
scope :region, -> region { where region: region } scope :region, -> region { where 'region = ? or locality', region }
scope :tag, -> tag { where "tags like ?", "%#{tag}%" } scope :tag, -> tag { where 'tags like ?', "%#{tag}%" }
before_validation(on: :create) do before_validation(on: :create) do
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter