Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions app/doorkeepers/base_doorkeeper.rb
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# -*- encoding : utf-8 -*-
class BaseDoorkeeper
include Untied::Publisher::Doorkeeper
#
# def initialize
# %w(space course space subject lecture user_environment_association
# user_course_association).each do |klass|
# watch klass.classify.constantize, :after_create, :after_update, :after_destroy
# end
#
# watch Enrollment, :after_destroy, :after_create
#
# watch Environment, :after_create, :after_update, :after_destroy,
# :represent_with => Untied::EnvironmentRepresenter
# watch User, :after_create, :after_update, :after_destroy,
# :represent_with => Untied::UserRepresenter
# watch UserSpaceAssociation, :after_create, :after_destroy
# end

def initialize
%w(space course space subject lecture user_environment_association
user_course_association).each do |klass|
watch klass.classify.constantize, :after_create, :after_update, :after_destroy
end

watch Enrollment, :after_destroy, :after_create

watch Environment, :after_create, :after_update, :after_destroy,
:represent_with => Untied::EnvironmentRepresenter
watch User, :after_create, :after_update, :after_destroy,
:represent_with => Untied::UserRepresenter
watch UserSpaceAssociation, :after_create, :after_destroy
end
end