Sha256: 94f3d3a9501250318f4c273cd9170bea6caacea06cd7851d4c1dbe2bd4601b75

Contents?: true

Size: 530 Bytes

Versions: 37

Compression:

Stored size: 530 Bytes

Contents

module MeducationSDK
  class GroupDiscussion < Resource
    self.path = "/group_discussions"

    def group
      @group ||= Group.find(group_id)
    end

    def started_by
      @started_by ||= User.find(started_by_id)
    end

    def posts
      @posts = GroupDiscussionPost.where(discussion_id: id)
    end
  end

  class GroupDiscussionMock < GroupDiscussion
    extend Loquor::ResourceMock

    self.attributes = {
      id: 1,
      group_id: 8,
      started_by_id: 7,
      title: "My great discussion"
    }
  end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
meducation_sdk-1.6.10 lib/meducation_sdk/resources/group_discussion.rb
meducation_sdk-1.6.6 lib/meducation_sdk/resources/group_discussion.rb
meducation_sdk-1.6.5 lib/meducation_sdk/resources/group_discussion.rb
meducation_sdk-1.6.4 lib/meducation_sdk/resources/group_discussion.rb
meducation_sdk-1.6.3 lib/meducation_sdk/resources/group_discussion.rb
meducation_sdk-1.6.2 lib/meducation_sdk/resources/group_discussion.rb
meducation_sdk-1.6.1 lib/meducation_sdk/resources/group_discussion.rb
meducation_sdk-1.6.0 lib/meducation_sdk/resources/group_discussion.rb
meducation_sdk-1.5.7 lib/meducation_sdk/resources/group_discussion.rb
meducation_sdk-1.5.6 lib/meducation_sdk/resources/group_discussion.rb
meducation_sdk-1.5.5 lib/meducation_sdk/resources/group_discussion.rb
meducation_sdk-1.5.4 lib/meducation_sdk/resources/group_discussion.rb
meducation_sdk-1.5.3 lib/meducation_sdk/resources/group_discussion.rb
meducation_sdk-1.5.2 lib/meducation_sdk/resources/group_discussion.rb
meducation_sdk-1.5.1 lib/meducation_sdk/resources/group_discussion.rb
meducation_sdk-1.5.0 lib/meducation_sdk/resources/group_discussion.rb
meducation_sdk-1.4.4 lib/meducation_sdk/resources/group_discussion.rb