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

Better server websites

parent 73912d92
No related branches found
No related tags found
No related merge requests found
......@@ -13,6 +13,7 @@ class Server::WebsitesController < Server::ApplicationController
end
def manage_versions
@websites = @websites.with_repository.with_url
load_filters
breadcrumb
add_breadcrumb "Gestion des versions"
......
......@@ -95,10 +95,13 @@ class Communication::Website < ApplicationRecord
}
scope :for_update, -> (autoupdate) { where(autoupdate_theme: autoupdate) }
scope :for_updatable_theme, -> (status) { updatable_theme if status == 'true' }
scope :with_repository, -> { where.not(repository: [nil, '']) }
scope :with_url, -> { where.not(url: [nil, '']) }
scope :with_access_token, -> { where.not(access_token: [nil, '']) }
scope :updatable_theme, -> {
where.not(repository: [nil, '']).
where.not(access_token: [nil, '']).
where.not(url: [nil, ''])
with_repository.
with_url.
with_access_token
}
def to_s
......
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