Skip to content
Snippets Groups Projects
Commit 344924d2 authored by Mauricio Giacomini Girardello's avatar Mauricio Giacomini Girardello
Browse files

adding comments for feedbacks models and services

parent d2a0fbd2
No related branches found
No related tags found
No related merge requests found
##Represents a software issue
class Bug
include ActiveModel::Model
attr_accessor :title, :description
......
##Feedback is an user review of the system
class Feedback < ActiveRecord::Base
belongs_to :user
has_and_belongs_to_many :feedback_ratings
......
##
# The Feedback service abstract two actions: report_bug, that delegates behavior for a BugReporter service; and send_feedback, that stores a user review of the system.
class FeedbackService
def initialize(bugreporter_service)
......@@ -5,16 +7,17 @@ class FeedbackService
end
##
# delegates the reporting behavior for a bug reporter service
# delegates the behavior for a bug reporter service
def report_bug(bug)
@bugreporter_service.report bug
end
##
##Feedback is an user review of the system
# store the feedbacks in database and send notification
def send_feedback(feedback)
# save and send an email
feedback.save!
# send notification
end
end
\ No newline at end of file
##
# This service represents the Gitlab Bug Reporter
# The client can report a bug, that will be created an issue for PortalMEC project.
class GitlabBugreporterService
PORTALMEC_PROJECT_ID = 633
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment