Last active
August 21, 2020 10:06
-
-
Save equivalent/06f752d99b0d438759e3de22dbd2e9bd to your computer and use it in GitHub Desktop.
Revisions
-
equivalent revised this gist
Aug 21, 2020 . No changes.There are no files selected for viewing
-
equivalent revised this gist
Aug 21, 2020 . 1 changed file with 0 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +0,0 @@ -
equivalent created this gist
Aug 21, 2020 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ teacher = Teacher.find(567) student = Student.find(123) student = Student.find(654) # Lesson creation lesson = teacher.classroom.create_lesson(students: [student1, student2], title: "Battle of Kursk") # Student uploads Work file some_file = File.open('/tmp/some_file.doc') lesson.classroom.upload_work(student: student1, file: some_file) # publish lesson lesson.classroom.publish # post comment to work work = Work.find(468) work.public_board.post_comment(student: student2, title: "Great work mate!") # Student marks lesson as favorite lesson.public_board.mark_as_favorite(current_user: student1) This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,4 @@ # Gist example Original article: https://blog.eq8.eu/article/rails-bounded-contexts.html