Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
Admin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
osuny
Admin
Commits
5110e211
Commit
5110e211
authored
1 year ago
by
Arnaud Levy
Browse files
Options
Downloads
Patches
Plain Diff
refactor
parent
7b3d5a07
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/models/communication/website/agenda/event.rb
+6
-12
6 additions, 12 deletions
app/models/communication/website/agenda/event.rb
with
6 additions
and
12 deletions
app/models/communication/website/agenda/event.rb
+
6
−
12
View file @
5110e211
...
...
@@ -172,18 +172,12 @@ class Communication::Website::Agenda::Event < ApplicationRecord
end
def
to_time
if
to_day
.
nil?
&&
to_hour
.
nil?
# Pas de fin
nil
elsif
to_day
.
nil?
&&
to_hour
.
present?
# Heure de fin, donc on se base sur le jour de début
date_and_time
(
from_day
,
to_hour
)
elsif
to_day
.
present?
&&
to_hour
.
nil?
# Jour de fin seul
to_day
.
to_time
elsif
to_day
.
present?
&&
to_hour
.
nil?
# Jour et heure de fin
date_and_time
(
to_day
,
to_hour
)
if
to_day
.
nil?
to_hour
.
nil?
?
nil
# Pas de fin, ni jour ni heure
:
date_and_time
(
from_day
,
to_hour
)
# Heure de fin, donc on se base sur le jour de début
elsif
to_day
.
present?
to_hour
.
nil?
?
to_day
.
to_time
# Jour de fin seul
:
date_and_time
(
to_day
,
to_hour
)
# Jour et heure de fin
end
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment