Better helper method names

This commit is contained in:
echarp 2019-06-25 22:39:57 +02:00
parent 84c04d5fc5
commit 2cec994d56
2 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
# Helper for the event views
module EventsHelper
def set_events_meta
def events_meta
set_meta_tags \
description: t('layouts.application.subtitle'),
keywords: params[:tag],
@ -11,7 +11,7 @@ module EventsHelper
}
end
def set_event_meta(event = @event)
def event_meta(event)
set_meta_tags \
keywords: event.tag_list,
DC: { title: event.title, date: event.start_time.to_s },
@ -23,7 +23,7 @@ module EventsHelper
}
end
def display_date(event = @event)
def display_date(event)
if event.start_time.to_date == event.end_time.to_date
display_sameday event
else

View File

@ -55,4 +55,4 @@
= render '/orgas/search'
- set_events_meta
- events_meta