Add comment functionality to tracks
This commit is contained in:
parent
770a63e15c
commit
58208c73ac
19 changed files with 153 additions and 48 deletions
|
|
@ -657,4 +657,4 @@ linters:
|
||||||
|
|
||||||
# Offense count: 38
|
# Offense count: 38
|
||||||
InlineStyles:
|
InlineStyles:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
@ -17,12 +17,12 @@ module Admin
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
# Returning all available comments, ordered by created_at: :desc and by event.title
|
# Returning all available comments, ordered by created_at: :desc
|
||||||
def accessible_ordered_comments
|
def accessible_ordered_comments
|
||||||
Comment.accessible_by(current_ability).joins('INNER JOIN events ON commentable_id = events.id').order('events.title', 'comments.created_at DESC')
|
Comment.accessible_by(current_ability).order('comments.created_at DESC')
|
||||||
end
|
end
|
||||||
|
|
||||||
# Grouping all comments by conference, and by event. It returns {:conference => {:event => [{comment_2}, {comment_1 }]}}
|
# Grouping all comments by conference, and by commentable obj. It returns {:conference => {:commentable => [{comment_2}, {comment_1 }]}}
|
||||||
def grouped_comments(remarks)
|
def grouped_comments(remarks)
|
||||||
remarks.group_by{ |comment| comment.commentable.program.conference }.map {|conference, comments| [conference, comments.group_by{|comment| comment.commentable}]}.to_h
|
remarks.group_by{ |comment| comment.commentable.program.conference }.map {|conference, comments| [conference, comments.group_by{|comment| comment.commentable}]}.to_h
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,9 @@ module Admin
|
||||||
end
|
end
|
||||||
|
|
||||||
def show
|
def show
|
||||||
|
@comments = @track.root_comments
|
||||||
|
@comment_count = @track.comment_threads.count
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html { render }
|
format.html { render }
|
||||||
format.json { render json: @conference.tracks.to_json }
|
format.json { render json: @conference.tracks.to_json }
|
||||||
|
|
@ -53,7 +56,20 @@ module Admin
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def edit; end
|
def edit
|
||||||
|
@comments = @track.root_comments
|
||||||
|
@comment_count = @track.comment_threads.count
|
||||||
|
end
|
||||||
|
|
||||||
|
def comment
|
||||||
|
comment = Comment.new(comment_params)
|
||||||
|
comment.commentable = @track
|
||||||
|
comment.user_id = current_user.id
|
||||||
|
comment.save!
|
||||||
|
comment.move_to_child_of(params[:parent]) unless params[:parent].nil?
|
||||||
|
|
||||||
|
redirect_to admin_conference_program_track_path(@conference.short_title, @track)
|
||||||
|
end
|
||||||
|
|
||||||
def update
|
def update
|
||||||
if @track.update_attributes(track_params)
|
if @track.update_attributes(track_params)
|
||||||
|
|
@ -139,6 +155,10 @@ module Admin
|
||||||
params.require(:track).permit(:name, :description, :color, :short_name, :cfp_active, :start_date, :end_date, :room_id)
|
params.require(:track).permit(:name, :description, :color, :short_name, :cfp_active, :start_date, :end_date, :room_id)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def comment_params
|
||||||
|
params.require(:comment).permit(:commentable, :body, :user_id)
|
||||||
|
end
|
||||||
|
|
||||||
def update_state(transition, notice)
|
def update_state(transition, notice)
|
||||||
errors = @track.update_state(transition)
|
errors = @track.update_state(transition)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -128,13 +128,19 @@ class Mailbot < ActionMailer::Base
|
||||||
|
|
||||||
def event_comment_mail(comment, user)
|
def event_comment_mail(comment, user)
|
||||||
@comment = comment
|
@comment = comment
|
||||||
@event = @comment.commentable
|
@commentable = @comment.commentable
|
||||||
@conference = @event.program.conference
|
@conference = @commentable.program.conference
|
||||||
@user = user
|
@user = user
|
||||||
|
if @comment.commentable_type == 'Event'
|
||||||
mail(to: @user.email,
|
mail(to: @user.email,
|
||||||
from: @conference.contact.email,
|
from: @conference.contact.email,
|
||||||
template_name: 'comment_template',
|
template_name: 'comment_event_template',
|
||||||
subject: "New comment has been posted for #{@event.title}")
|
subject: "New comment has been posted for #{@commentable.title}")
|
||||||
|
elsif @comment.commentable_type == 'Track'
|
||||||
|
mail(to: @user.email,
|
||||||
|
from: @conference.contact.email,
|
||||||
|
template_name: 'comment_track_template',
|
||||||
|
subject: "New comment has been posted for #{@commentable.short_name}")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -155,15 +155,17 @@ class Ability
|
||||||
can :manage, Registration, conference_id: conf_ids_for_organizer
|
can :manage, Registration, conference_id: conf_ids_for_organizer
|
||||||
# To access conference/proposals
|
# To access conference/proposals
|
||||||
can :manage, Event, program: { conference_id: conf_ids_for_organizer }
|
can :manage, Event, program: { conference_id: conf_ids_for_organizer }
|
||||||
|
can :manage, Comment
|
||||||
# To access comment link in menu bar
|
# To access comment link in menu bar
|
||||||
can :index, Comment, commentable_type: 'Event',
|
# can :index, Comment, commentable_type: 'Event',
|
||||||
commentable_id: Event.where(program_id: Program.where(conference_id: conf_ids_for_organizer).pluck(:id)).pluck(:id)
|
# commentable_id: Event.where(program_id: Program.where(conference_id: conf_ids_for_organizer).pluck(:id)).pluck(:id)
|
||||||
end
|
end
|
||||||
|
|
||||||
if conf_ids_for_cfp
|
if conf_ids_for_cfp
|
||||||
# To access comment link in menu bar
|
# To access comment link in menu bar
|
||||||
can :index, Comment, commentable_type: 'Event',
|
can :manage, Comment
|
||||||
commentable_id: Event.where(program_id: Program.where(conference_id: conf_ids_for_cfp).pluck(:id)).pluck(:id)
|
# can :index, Comment, commentable_type: 'Event',
|
||||||
|
# commentable_id: Event.where(program_id: Program.where(conference_id: conf_ids_for_cfp).pluck(:id)).pluck(:id)
|
||||||
# To access conference/proposals
|
# To access conference/proposals
|
||||||
can :manage, Event, program: { conference_id: conf_ids_for_cfp }
|
can :manage, Event, program: { conference_id: conf_ids_for_cfp }
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -102,6 +102,7 @@ class AdminAbility
|
||||||
signed_in_with_organizer_role(user, conf_ids_for_organization_admin)
|
signed_in_with_organizer_role(user, conf_ids_for_organization_admin)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# rubocop:disable Metrics/AbcSize
|
||||||
def signed_in_with_organizer_role(user, conf_ids_for_organization_admin = [])
|
def signed_in_with_organizer_role(user, conf_ids_for_organization_admin = [])
|
||||||
# ids of all the conferences for which the user has the 'organizer' role and
|
# ids of all the conferences for which the user has the 'organizer' role and
|
||||||
# conferences that belong to organizations for which user is 'organization_admin'
|
# conferences that belong to organizations for which user is 'organization_admin'
|
||||||
|
|
@ -149,7 +150,8 @@ class AdminAbility
|
||||||
end
|
end
|
||||||
can :index, Comment, commentable_type: 'Event',
|
can :index, Comment, commentable_type: 'Event',
|
||||||
commentable_id: Event.where(program_id: Program.where(conference_id: conf_ids).pluck(:id)).pluck(:id)
|
commentable_id: Event.where(program_id: Program.where(conference_id: conf_ids).pluck(:id)).pluck(:id)
|
||||||
|
can :index, Comment, commentable_type: 'Track',
|
||||||
|
commentable_id: Track.where(program_id: Program.where(conference_id: conf_ids).pluck(:id)).pluck(:id)
|
||||||
# Abilities for Role (Conference resource)
|
# Abilities for Role (Conference resource)
|
||||||
can [:index, :show], Role do |role|
|
can [:index, :show], Role do |role|
|
||||||
role.resource_type == 'Conference' || role.resource_type == 'Track'
|
role.resource_type == 'Conference' || role.resource_type == 'Track'
|
||||||
|
|
@ -163,6 +165,7 @@ class AdminAbility
|
||||||
can [:index, :revert_object, :revert_attribute], PaperTrail::Version, item_type: 'User'
|
can [:index, :revert_object, :revert_attribute], PaperTrail::Version, item_type: 'User'
|
||||||
can [:index, :revert_object, :revert_attribute], PaperTrail::Version, conference_id: conf_ids
|
can [:index, :revert_object, :revert_attribute], PaperTrail::Version, conference_id: conf_ids
|
||||||
end
|
end
|
||||||
|
# rubocop:enable Metrics/AbcSize
|
||||||
|
|
||||||
def signed_in_with_cfp_role(user)
|
def signed_in_with_cfp_role(user)
|
||||||
# ids of all the conferences for which the user has the 'cfp' role
|
# ids of all the conferences for which the user has the 'cfp' role
|
||||||
|
|
@ -189,6 +192,8 @@ class AdminAbility
|
||||||
can :index, Comment, commentable_type: 'Event',
|
can :index, Comment, commentable_type: 'Event',
|
||||||
commentable_id: Event.where(program_id: Program.where(conference_id: conf_ids_for_cfp).pluck(:id)).pluck(:id)
|
commentable_id: Event.where(program_id: Program.where(conference_id: conf_ids_for_cfp).pluck(:id)).pluck(:id)
|
||||||
|
|
||||||
|
can :index, Comment, commentable_type: 'Track',
|
||||||
|
commentable_id: Track.where(program_id: Program.where(conference_id: conf_ids).pluck(:id)).pluck(:id)
|
||||||
# Abilities for Role (Conference resource)
|
# Abilities for Role (Conference resource)
|
||||||
can [:index, :show], Role do |role|
|
can [:index, :show], Role do |role|
|
||||||
role.resource_type == 'Conference' || role.resource_type == 'Track'
|
role.resource_type == 'Conference' || role.resource_type == 'Track'
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,8 @@ class Track < ApplicationRecord
|
||||||
|
|
||||||
has_paper_trail ignore: [:updated_at], meta: { conference_id: :conference_id }
|
has_paper_trail ignore: [:updated_at], meta: { conference_id: :conference_id }
|
||||||
|
|
||||||
|
acts_as_commentable
|
||||||
|
|
||||||
before_create :generate_guid
|
before_create :generate_guid
|
||||||
validates :name, presence: true
|
validates :name, presence: true
|
||||||
validates :color, format: /\A#[0-9A-F]{6}\z/
|
validates :color, format: /\A#[0-9A-F]{6}\z/
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,14 @@
|
||||||
- @comments.each do |conference, events|
|
- @comments.each do |conference, objects|
|
||||||
.panel.panel-default
|
.panel.panel-default
|
||||||
.panel-heading
|
.panel-heading
|
||||||
%h4.title.panel-title= conference.title
|
%h4.title.panel-title= conference.title
|
||||||
.panel-body
|
.panel-body
|
||||||
- events.each do |event, comments|
|
- objects.each do |obj, comments|
|
||||||
.notifications
|
.notifications
|
||||||
%h4.title= link_to event.title, admin_conference_program_event_path(event.program.conference.short_title, event)
|
- if obj.class.name == 'Event'
|
||||||
|
%h4.title= link_to obj.title, admin_conference_program_event_path(obj.program.conference.short_title, obj)
|
||||||
|
- if obj.class.name == 'Track'
|
||||||
|
%h4.title= link_to obj.name, admin_conference_program_track_path(obj.program.conference.short_title, obj)
|
||||||
%hr
|
%hr
|
||||||
- comments.each do |comment|
|
- comments.each do |comment|
|
||||||
%h5.strong Posted by: #{comment.user.name} | Created at: #{comment.created_at}
|
%h5.strong Posted by: #{comment.user.name} | Created at: #{comment.created_at}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,14 @@
|
||||||
- @posted_comments.each do |conference, events|
|
- @posted_comments.each do |conference, objects|
|
||||||
.panel.panel-default
|
.panel.panel-default
|
||||||
.panel-heading
|
.panel-heading
|
||||||
%h4.title.panel-title= conference.title
|
%h4.title.panel-title= conference.title
|
||||||
.panel-body
|
.panel-body
|
||||||
- events.each do |event, comments|
|
- objects.each do |obj, comments|
|
||||||
.notifications
|
.notifications
|
||||||
%h4.title= link_to event.title, admin_conference_program_event_path(event.program.conference.short_title, event)
|
- if obj.class.name == 'Event'
|
||||||
|
%h4.title= link_to obj.title, admin_conference_program_event_path(obj.program.conference.short_title, obj)
|
||||||
|
- if obj.class.name == 'Track'
|
||||||
|
%h4.title= link_to obj.name, admin_conference_program_track_path(obj.program.conference.short_title, obj)
|
||||||
%hr
|
%hr
|
||||||
- comments.each do |comment|
|
- comments.each do |comment|
|
||||||
%h5.strong Created at: #{comment.created_at}
|
%h5.strong Created at: #{comment.created_at}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,14 @@
|
||||||
- @unread_comments.each do |conference, events|
|
- @unread_comments.each do |conference, objects|
|
||||||
.panel.panel-default
|
.panel.panel-default
|
||||||
.panel-heading
|
.panel-heading
|
||||||
%h4.title.panel-title= conference.title
|
%h4.title.panel-title= conference.title
|
||||||
.panel-body
|
.panel-body
|
||||||
- events.each do |event, comments|
|
- objects.each do |obj, comments|
|
||||||
.notifications
|
.notifications
|
||||||
%h4.title= link_to event.title, admin_conference_program_event_path(event.program.conference.short_title, event)
|
- if obj.class.name == 'Event'
|
||||||
|
%h4.title= link_to obj.title, admin_conference_program_event_path(obj.program.conference.short_title, obj)
|
||||||
|
- if obj.class.name == 'Track'
|
||||||
|
%h4.title= link_to obj.name, admin_conference_program_track_path(obj.program.conference.short_title, obj)
|
||||||
%hr
|
%hr
|
||||||
- comments.each do |comment|
|
- comments.each do |comment|
|
||||||
%h5.strong Posted by: #{comment.user.name} | Created at: #{comment.created_at}
|
%h5.strong Posted by: #{comment.user.name} | Created at: #{comment.created_at}
|
||||||
|
|
|
||||||
15
app/views/admin/tracks/_nested_comments.html.haml
Normal file
15
app/views/admin/tracks/_nested_comments.html.haml
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
%div{ style: "padding-left:#{padding}px" }
|
||||||
|
.well.comment-section
|
||||||
|
%strong= comment.user.name
|
||||||
|
%i= comment.created_at
|
||||||
|
%p.comment-body= comment.body
|
||||||
|
%div
|
||||||
|
%a.pull-right.comment-reply-link{ href: '#' } Reply
|
||||||
|
.comment-reply
|
||||||
|
= semantic_form_for :comment, url: comment_admin_conference_program_track_path(@conference.short_title, @track.short_name, comment.commentable_id), method: :post do |f|
|
||||||
|
= f.input :body
|
||||||
|
%input{ name: 'parent', type: 'hidden', value: comment.id }
|
||||||
|
%input{ name: 'authenticity_token', type: 'hidden', value: '#{form_authenticity_token}' }
|
||||||
|
%button.btn.btn-primary.pull-right{ name: 'button', type: 'submit' } Add Reply
|
||||||
|
- comment.children.each do |child|
|
||||||
|
= render 'nested_comments', comment: child, padding: 50
|
||||||
|
|
@ -127,3 +127,21 @@
|
||||||
= event.state
|
= event.state
|
||||||
%td
|
%td
|
||||||
= event.time
|
= event.time
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.row
|
||||||
|
= link_to "Comments (#{@comment_count})", '#', id: 'event-comment-link'
|
||||||
|
#comments-div
|
||||||
|
%hr
|
||||||
|
%ul.media
|
||||||
|
%div
|
||||||
|
.row-fluid
|
||||||
|
= semantic_form_for :comment, url: comment_admin_conference_program_track_path(@conference.short_title, @track.short_name), method: :post do |f|
|
||||||
|
= f.input :body
|
||||||
|
= f.submit 'Add Comment', class: 'btn btn-primary pull-right'
|
||||||
|
%br
|
||||||
|
%br
|
||||||
|
- @comments.each do |comment|
|
||||||
|
%div
|
||||||
|
= render partial: 'nested_comments', locals: { comment: comment, padding: 0}
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,11 @@
|
||||||
Notifications (#{unread_notifications(current_user).length})
|
Notifications (#{unread_notifications(current_user).length})
|
||||||
- if unread_notifications(current_user).length > 0
|
- if unread_notifications(current_user).length > 0
|
||||||
%li.dropdown-header Last 5 Comments for:
|
%li.dropdown-header Last 5 Comments for:
|
||||||
- unread_notifications(current_user).limit(5).group_by{ |comment| comment.commentable}.each do |event, comments|
|
- unread_notifications(current_user).limit(5).group_by{ |comment| comment.commentable}.each do |obj, comments|
|
||||||
%li= link_to("#{event.title}(#{comments.count})", admin_conference_program_event_path(event.program.conference.short_title, event.id))
|
- if obj.class.name === 'Event'
|
||||||
|
%li= link_to("#{obj.title}(#{comments.count})", admin_conference_program_event_path(obj.program.conference.short_title, obj.id))
|
||||||
|
- if obj.class.name === 'Track'
|
||||||
|
%li= link_to("#{obj.name}(#{comments.count})", admin_conference_program_track_path(obj.program.conference.short_title, obj))
|
||||||
%li.divider
|
%li.divider
|
||||||
%li= link_to "See all unread Comments (#{unread_notifications(current_user).length})", admin_comments_path
|
%li= link_to "See all unread Comments (#{unread_notifications(current_user).length})", admin_comments_path
|
||||||
%li= link_to 'See all Comments', admin_comments_path(anchor: 'all_comments')
|
%li= link_to 'See all Comments', admin_comments_path(anchor: 'all_comments')
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
Dear <%= @user.name %>,
|
Dear <%= @user.name %>,
|
||||||
|
|
||||||
User <%= @comment.user.name %> posted a new comment for event <%= @event.title %> of <%= @conference.short_title %> .
|
User <%= @comment.user.name %> posted a new comment for event <%= @commentable.title %> of <%= @conference.short_title %> .
|
||||||
|
|
||||||
"<%= @comment.body %>"
|
"<%= @comment.body %>"
|
||||||
|
|
||||||
To reply to this comment, please go to <%= h(admin_conference_program_event_url(@conference.short_title, @event, only_path: false)) %>
|
To reply to this comment, please go to <%= h(admin_conference_program_event_url(@conference.short_title, @commentable, only_path: false)) %>
|
||||||
|
|
||||||
Best wishes,
|
Best wishes,
|
||||||
<%= @conference.title %> Team
|
<%= @conference.title %> Team
|
||||||
10
app/views/mailbot/comment_track_template.text.erb
Normal file
10
app/views/mailbot/comment_track_template.text.erb
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
Dear <%= @user.name %>,
|
||||||
|
|
||||||
|
User <%= @comment.user.name %> posted a new comment for track <%= @commentable.short_name %> of <%= @conference.short_title %> .
|
||||||
|
|
||||||
|
"<%= @comment.body %>"
|
||||||
|
|
||||||
|
To reply to this comment, please go to <%= h(admin_conference_program_track_url(@conference.short_title, @commentable, only_path: false)) %>
|
||||||
|
|
||||||
|
Best wishes,
|
||||||
|
<%= @conference.title %> Team
|
||||||
|
|
@ -1,32 +1,25 @@
|
||||||
<%
|
# SQLite version 3.x
|
||||||
encoding = 'unicode'
|
# gem install sqlite3
|
||||||
if ENV['OSEM_DB_ADAPTER'] == 'mysql2'
|
#
|
||||||
encoding = 'utf8'
|
# Ensure the SQLite 3 gem is defined in your Gemfile
|
||||||
end
|
# gem 'sqlite3'
|
||||||
%>
|
#
|
||||||
|
|
||||||
|
|
||||||
default: &default
|
default: &default
|
||||||
adapter: <%= ENV['OSEM_DB_ADAPTER'] || 'postgresql' %>
|
adapter: sqlite3
|
||||||
encoding: <%= encoding %>
|
|
||||||
host: <%= ENV['OSEM_DB_HOST'] || 'database' %>
|
|
||||||
port: <%= ENV['OSEM_DB_PORT'] || '5432' %>
|
|
||||||
username: <%= ENV['OSEM_DB_USER'] || 'postgres' %>
|
|
||||||
password: <%= ENV['OSEM_DB_PASSWORD'] || 'mysecretpassword' %>
|
|
||||||
database: <%= ENV['OSEM_DB_NAME'] || 'postgres' %>
|
|
||||||
pool: 5
|
pool: 5
|
||||||
timeout: 5000
|
timeout: 5000
|
||||||
|
|
||||||
development:
|
development:
|
||||||
<<: *default
|
<<: *default
|
||||||
database: osem_development
|
database: db/development.sqlite3
|
||||||
|
|
||||||
# Warning: The database defined as "test" will be erased and
|
# Warning: The database defined as "test" will be erased and
|
||||||
# re-generated when you run "rake".
|
# re-generated from your development database when you run "rake".
|
||||||
# Do not set this db to the same as development or production.
|
# Do not set this db to the same as development or production.
|
||||||
test:
|
test:
|
||||||
<<: *default
|
<<: *default
|
||||||
database: osem_test
|
database: db/test.sqlite3
|
||||||
|
|
||||||
production:
|
production:
|
||||||
<<: *default
|
<<: *default
|
||||||
|
database: db/production.sqlite3
|
||||||
|
|
@ -81,6 +81,7 @@ Osem::Application.routes.draw do
|
||||||
patch :toggle_cfp_inclusion
|
patch :toggle_cfp_inclusion
|
||||||
patch :restart
|
patch :restart
|
||||||
patch :to_accept
|
patch :to_accept
|
||||||
|
post :comment
|
||||||
patch :accept
|
patch :accept
|
||||||
patch :confirm
|
patch :confirm
|
||||||
patch :to_reject
|
patch :to_reject
|
||||||
|
|
|
||||||
10
db/migrate/20190720062321_add_comments_count_to_tracks.rb
Normal file
10
db/migrate/20190720062321_add_comments_count_to_tracks.rb
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
class AddCommentsCountToTracks < ActiveRecord::Migration[5.1]
|
||||||
|
def change
|
||||||
|
add_column :tracks, :comments_count, :integer, default: 0, null: false
|
||||||
|
|
||||||
|
Track.find_each do |track|
|
||||||
|
comments_count = track.comment_threads.count
|
||||||
|
track.update_attributes(:comments_count, comments_count) unless comments_count.zero?
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
11
db/schema.rb
11
db/schema.rb
|
|
@ -10,7 +10,11 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
ActiveRecord::Schema.define(version: 2019_06_03_143107) do
|
ActiveRecord::Schema.define(version: 2019_06_03_143107) do
|
||||||
|
=======
|
||||||
|
ActiveRecord::Schema.define(version: 20190720062321) do
|
||||||
|
>>>>>>> Add comment functionality to tracks
|
||||||
|
|
||||||
create_table "answers", force: :cascade do |t|
|
create_table "answers", force: :cascade do |t|
|
||||||
t.string "title"
|
t.string "title"
|
||||||
|
|
@ -549,6 +553,10 @@ ActiveRecord::Schema.define(version: 2019_06_03_143107) do
|
||||||
t.date "end_date"
|
t.date "end_date"
|
||||||
t.text "relevance"
|
t.text "relevance"
|
||||||
t.integer "selected_schedule_id"
|
t.integer "selected_schedule_id"
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
t.integer "comments_count", default: 0, null: false
|
||||||
|
>>>>>>> Add comment functionality to tracks
|
||||||
t.index ["room_id"], name: "index_tracks_on_room_id"
|
t.index ["room_id"], name: "index_tracks_on_room_id"
|
||||||
t.index ["selected_schedule_id"], name: "index_tracks_on_selected_schedule_id"
|
t.index ["selected_schedule_id"], name: "index_tracks_on_selected_schedule_id"
|
||||||
t.index ["submitter_id"], name: "index_tracks_on_submitter_id"
|
t.index ["submitter_id"], name: "index_tracks_on_submitter_id"
|
||||||
|
|
@ -587,6 +595,7 @@ ActiveRecord::Schema.define(version: 2019_06_03_143107) do
|
||||||
t.boolean "is_admin", default: false
|
t.boolean "is_admin", default: false
|
||||||
t.string "username"
|
t.string "username"
|
||||||
t.boolean "is_disabled", default: false
|
t.boolean "is_disabled", default: false
|
||||||
|
<<<<<<< HEAD
|
||||||
t.string "invitation_token"
|
t.string "invitation_token"
|
||||||
t.datetime "invitation_created_at"
|
t.datetime "invitation_created_at"
|
||||||
t.datetime "invitation_sent_at"
|
t.datetime "invitation_sent_at"
|
||||||
|
|
@ -595,6 +604,8 @@ ActiveRecord::Schema.define(version: 2019_06_03_143107) do
|
||||||
t.string "invited_by_type"
|
t.string "invited_by_type"
|
||||||
t.integer "invited_by_id"
|
t.integer "invited_by_id"
|
||||||
t.integer "invitations_count", default: 0
|
t.integer "invitations_count", default: 0
|
||||||
|
=======
|
||||||
|
>>>>>>> Add comment functionality to tracks
|
||||||
t.index ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true
|
t.index ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true
|
||||||
t.index ["email"], name: "index_users_on_email", unique: true
|
t.index ["email"], name: "index_users_on_email", unique: true
|
||||||
t.index ["invitation_token"], name: "index_users_on_invitation_token", unique: true
|
t.index ["invitation_token"], name: "index_users_on_invitation_token", unique: true
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue