Browse Source

Better helper method names

remotes/origin/master
echarp 3 years ago
parent
commit
2cec994d56
  1. 6
      app/helpers/events_helper.rb
  2. 2
      app/views/events/index.html.haml

6
app/helpers/events_helper.rb

@ -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

2
app/views/events/index.html.haml

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

Loading…
Cancel
Save