-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
This is boring:
#./app/services/review_service.rb
# Serivces can't use any current_user, so we have to
# pass some more options.
class ReviewService < BaseSevice
def mark_featured(review_id, options)
review = Review.find(review_id)
AccessSchema.schema(:acl).require! review, :mark_featured, {
:role => options[:actor].roles,
}
AccessSchema.schema(:plans).require! review, :mark_featured, {
:plan => options[:actor].plan
}
review.featured = true
review.save!
end
end