fix stream_items_helper for rails 3
Change-Id: Iaa6ab979df100c5770d09435641142d45f66ae75 Reviewed-on: https://gerrit.instructure.com/30963 Tested-by: Jenkins <jenkins@instructure.com> Reviewed-by: Cody Cutrer <cody@instructure.com> Product-Review: James Williams <jamesw@instructure.com> QA-Review: James Williams <jamesw@instructure.com>
This commit is contained in:
parent
5b08359e73
commit
27ebdd7ecc
|
@ -227,8 +227,8 @@ class NotificationMessageCreator
|
|||
|
||||
def message_options_for(user)
|
||||
user_asset = asset_filtered_by_user(user)
|
||||
|
||||
user_asset_context = user_asset.context(user) rescue user_asset
|
||||
|
||||
user_asset_context = %w{ContentMigration Submission WikiPage}.include?(user_asset.class.name) ? user_asset.context(user) : user_asset
|
||||
|
||||
message_options = {
|
||||
:subject => @notification.subject,
|
||||
|
|
|
@ -66,7 +66,7 @@ describe StreamItemsHelper do
|
|||
# this discussion topic will not be shown since it is a graded discussion with a
|
||||
# future unlock at date
|
||||
@group_assignment_discussion = group_assignment_discussion({ :course => @course })
|
||||
@group_assignment_discussion.update_attribute(:user_id, @teacher.id)
|
||||
@group_assignment_discussion.update_attribute(:user, @teacher)
|
||||
assignment = @group_assignment_discussion.assignment
|
||||
assignment.update_attributes({
|
||||
:due_at => 30.days.from_now,
|
||||
|
|
Loading…
Reference in New Issue