-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
131 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,65 +28,4 @@ def event_invited() | |
mail(to: [@recipient], subject: subject) | ||
end | ||
|
||
# def update_event | ||
# ev = Event.find(params[:event_id]) | ||
# cal = Icalendar::Calendar.new | ||
# cal.event do |e| | ||
# e.dtstart = Icalendar::Values::DateTime.new(ev.start_time.in_time_zone(ev.timezone)) | ||
# e.dtend = Icalendar::Values::DateTime.new(ev.end_time.in_time_zone(ev.timezone)) | ||
# e.summary = ev.title || "" | ||
# e.description = ev.content || "" | ||
# e.uid = "sola-#{ev.id}" | ||
# e.status = "CONFIRMED" | ||
# e.organizer = Icalendar::Values::CalAddress.new("mailto:[email protected]", cn: params[:group_name]) | ||
# e.attendee = ["mailto:#{params[:recipient]}"] | ||
# e.url = "https://app.sola.day/event/detail/#{ev.id}" | ||
# e.location = "https://app.sola.day/event/detail/#{ev.id}" | ||
# end | ||
|
||
# ics = cal.to_ical | ||
# attachments['invite.ics'] = {:mime_type => 'text/calendar', :content => ics} | ||
|
||
# @recipient = params[:recipient] | ||
# @email_title = params[:email_title] | ||
# @event_title = params[:event_title] | ||
# @event_group_url = params[:group_url] | ||
# @event_group_name = params[:group_name] | ||
# @event_timeinfo = params[:timeinfo] | ||
# @event_location = params[:location] | ||
# @event_location_url = params[:location_url] | ||
# @event_url = params[:url] | ||
# @event_object = ev | ||
# mail(to: [@recipient], subject: params[:subject]) | ||
# end | ||
|
||
# def event_invite | ||
# ev = Event.find(params[:event_id]) | ||
# cal = Icalendar::Calendar.new | ||
# cal.event do |e| | ||
# e.dtstart = Icalendar::Values::DateTime.new(ev.start_time) | ||
# e.dtend = Icalendar::Values::DateTime.new(ev.end_time) | ||
# e.summary = ev.title || "" | ||
# e.description = ev.content || "" | ||
# e.uid = "sola-#{ev.id}" | ||
# e.status = "CONFIRMED" | ||
# e.organizer = Icalendar::Values::CalAddress.new("mailto:[email protected]", cn: params[:group_name]) | ||
# e.attendee = ["mailto:#{params[:recipient]}"] | ||
# e.url = "https://app.sola.day/event/detail/#{ev.id}" | ||
# e.location = "https://app.sola.day/event/detail/#{ev.id}" | ||
# end | ||
|
||
# ics = cal.to_ical | ||
# attachments['invite.ics'] = {:mime_type => 'text/calendar', :content => ics} | ||
|
||
# @recipient = params[:recipient] | ||
# @event_title = params[:title] | ||
# @event_group_url = params[:group_url] | ||
# @event_group_name = params[:group_name] | ||
# @event_timeinfo = params[:timeinfo] | ||
# @event_location = params[:location] | ||
# @event_location_url = params[:location_url] | ||
# @event_url = params[:url] | ||
# mail(to: [@recipient], subject: 'Social Layer Event Invite') | ||
# end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
class Track < ApplicationRecord | ||
belongs_to :group | ||
has_many :track_roles, dependent: :delete_all | ||
|
||
accepts_nested_attributes_for :track_roles, allow_destroy: true | ||
validates :kind, inclusion: { in: %w(public private) } | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class TrackRole < ApplicationRecord | ||
belongs_to :track | ||
belongs_to :profile | ||
validates :role, inclusion: { in: %w(member manager) } | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
class CreateTrackRoles < ActiveRecord::Migration[7.2] | ||
def change | ||
create_table :track_roles do |t| | ||
t.integer "track_id" | ||
t.integer "profile_id" | ||
t.string "receiver_address" | ||
t.string "role", default: "member" | ||
t.timestamps | ||
end | ||
|
||
add_column :events, :track_id, :integer | ||
end | ||
end |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html | ||
|
||
# This model initially had no columns defined. If you add columns to the | ||
# model remove the "{}" from the fixture names and add the columns immediately | ||
# below each fixture, per the syntax in the comments below | ||
# | ||
one: {} | ||
# column: value | ||
# | ||
two: {} | ||
# column: value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
require "test_helper" | ||
|
||
class TrackRoleTest < ActiveSupport::TestCase | ||
# test "the truth" do | ||
# assert true | ||
# end | ||
end |