mirror of
https://github.com/discourse/discourse.git
synced 2024-12-18 21:18:34 +08:00
fcc2e7ebbf
This commit migrates all bookmarks to be polymorphic (using the bookmarkable_id and bookmarkable_type) columns. It also deletes all the old code guarded behind the use_polymorphic_bookmarks setting and changes that setting to true for all sites and by default for the sake of plugins. No data is deleted in the migrations, the old post_id and for_topic columns for bookmarks will be dropped later on.
16 lines
606 B
Plaintext
16 lines
606 B
Plaintext
BEGIN:VCALENDAR
|
|
VERSION:2.0
|
|
PRODID:-//Discourse//<%= Discourse.current_hostname %>//<%= Discourse.full_version %>//EN
|
|
<% @bookmark_reminders.each do |bookmark| %>
|
|
BEGIN:VEVENT
|
|
UID:bookmark_reminder_#<%= bookmark.id %>@<%= Discourse.current_hostname %>
|
|
DTSTAMP:<%= bookmark.updated_at.strftime(I18n.t("datetime_formats.formats.calendar_ics")) %>
|
|
DTSTART:<%= bookmark.reminder_at_ics_start %>
|
|
DTEND:<%= bookmark.reminder_at_ics_end %>
|
|
SUMMARY:<%= bookmark.name.presence || bookmark.title %>
|
|
DESCRIPTION:<%= bookmark.bookmarkable_url %>
|
|
URL:<%= bookmark.bookmarkable_url %>
|
|
END:VEVENT
|
|
<% end %>
|
|
END:VCALENDAR
|