kayhtee

Joined

120 Experience
1 Lesson Completed
0 Questions Solved

Activity

Posted in Multi-event .ICS file generation?

well, nevermind, I put it in the controlller on the active admin index page like this:

def index
      @myevents = Invoice.ransack(params[:q]).result
      super do |format|
        format.ics do
          cal = Icalendar::Calendar.new
          @myevents.each do |myevent|
            event = Icalendar::Event.new
            event.dtstart = myevent.due
            event.summary = myevent.sm_contract.customer.name
            cal.add_event(event)
          end
          cal.publish
          render :plain =>  cal.to_ical
        end
      end
    end

maybe not as smart as your proposal but it's working :-) Still this thread was helpful for me.

Posted in Multi-event .ICS file generation?

hmm, just stumbled over this thread.. trying to use this on an invoices calendar, but calender is always empty. I'm on rails 5 and using active admin 2.2 ..
you don't have a web cast about this yet?