Skip to content
Snippets Groups Projects
Commit 2ebf9a9a authored by Arnaud Levy's avatar Arnaud Levy
Browse files

Fix #1082

parent 058dc462
No related branches found
No related tags found
No related merge requests found
class Server::WebsitesController < Server::ApplicationController
has_scope :for_theme_version
has_scope :for_production
has_scope :for_search_term
def index
......
......@@ -62,6 +62,7 @@ class Communication::Website < ApplicationRecord
scope :ordered, -> { order(:name) }
scope :in_production, -> { where(in_production: true) }
scope :for_production, -> (production) { where(in_production: production) }
scope :for_theme_version, -> (version) { where(theme_version: version) }
scope :for_search_term, -> (term) {
where("
......
......@@ -6,6 +6,9 @@ module Filters
add :for_theme_version,
::Communication::Website.all.pluck(:theme_version).uniq.sort,
'Filtrer par version du thème'
add :for_production,
[{ to_s: I18n.t('true'), id: 'true' }, { to_s: I18n.t('false'), id: 'false' }],
'Filtrer par état de production'
end
end
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