Sha256: 4ff66fc7f70546d2259304ff027c5ce7f86a1a412e299274ea406dfdb1b441d3
Contents?: true
Size: 521 Bytes
Versions: 3
Compression:
Stored size: 521 Bytes
Contents
module EventsHelper def event_class(day) begin_date = Time.now.beginning_of_week.to_date end_date = begin_date + 28 busy_dates = profile_or_current_subject. events. ocurrences(begin_date, end_date) [].tap { |css| css << if day < Date.today "past" elsif day == Date.today "today" elsif day.month != Date.today.month "next_month" end css << "busy" if busy_dates.include?(day) }.join(" ") end end
Version data entries
3 entries across 3 versions & 2 rubygems
Version | Path |
---|---|
social_stream-0.17.1 | events/app/helpers/events_helper.rb |
social_stream-0.17.0 | events/app/helpers/events_helper.rb |
social_stream-events-0.4.0 | app/helpers/events_helper.rb |