FEATURE: save local date to calendar (#14486)

It allows saving local date to calendar.
Modal is giving option to pick between ics and google. User choice can be remembered as a default for the next actions.
This commit is contained in:
Krzysztof Kotlarek
2021-10-06 14:11:52 +11:00
committed by GitHub
parent 6ab5f70090
commit cb5b0cb9d8
26 changed files with 741 additions and 5 deletions

View File

@ -11,6 +11,8 @@ class UserOption < ActiveRecord::Base
after_save :update_tracked_topics
enum default_calendar: { none_selected: 0, ics: 1, google: 2 }
def self.ensure_consistency!
sql = <<~SQL
SELECT u.id FROM users u
@ -256,8 +258,10 @@ end
# dark_scheme_id :integer
# skip_new_user_tips :boolean default(FALSE), not null
# color_scheme_id :integer
# default_calendar :integer default("none_selected"), not null
#
# Indexes
#
# index_user_options_on_user_id (user_id) UNIQUE
# index_user_options_on_user_id (user_id) UNIQUE
# index_user_options_on_user_id_and_default_calendar (user_id,default_calendar)
#