fix yard documentation for polling controllers

fixes CNVS-12913
YARD documentation needs to be above the explicit class it's referencing
and documenting.

Change-Id: I9e143c1f5300cad4abaa04f21c76820e8a0f6913
Reviewed-on: https://gerrit.instructure.com/34478
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Josh Simpson <jsimpson@instructure.com>
This commit is contained in:
Josh Simpson 2014-05-07 11:54:07 -06:00
parent f3b9511d71
commit 854bae635b
3 changed files with 87 additions and 89 deletions

View File

@ -15,34 +15,34 @@
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
# @API PollChoices
# @beta
# Manage choices for polls
#
# @model PollChoice
# {
# "id": "PollChoice",
# "required": ["id", "text"],
# "properties": {
# "id": {
# "description": "The unique identifier for the poll choice.",
# "example": 1023,
# "type": "integer"
# },
# "is_correct": {
# "description": "Specifies whether or not this poll choice is a 'correct' choice.",
# "example": "true",
# "type": "boolean"
# },
# "text": {
# "description": "The text of the poll choice.",
# "type": "string",
# "example": "Choice A"
# }
# }
# }
#
module Polling
# @API PollChoices
# @beta
# Manage choices for polls
#
# @model PollChoice
# {
# "id": "PollChoice",
# "required": ["id", "text"],
# "properties": {
# "id": {
# "description": "The unique identifier for the poll choice.",
# "example": 1023,
# "type": "integer"
# },
# "is_correct": {
# "description": "Specifies whether or not this poll choice is a 'correct' choice.",
# "example": "true",
# "type": "boolean"
# },
# "text": {
# "description": "The text of the poll choice.",
# "type": "string",
# "example": "Choice A"
# }
# }
# }
#
class PollChoicesController < ApplicationController
include Filters::Polling

View File

@ -15,37 +15,36 @@
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
# @API PollSubmissions
# @beta
# Manage submissions for polls
#
# @model PollSubmission
# {
# "id": "PollSubmission",
# "required": ["id", "poll", "user"],
# "properties": {
# "id": {
# "description": "The unique identifier for the account role/user assignment.",
# "example": 1023,
# "type": "integer"
# },
# "poll": {
# "description": "The poll this submission is for. See the Polls API for details.",
# "$ref": "Poll"
# },
# "user": {
# "description": "The user that submitted the poll submission. See the Users API for details.",
# "$ref": "User"
# },
# "status": {
# "description": "The status of the account role/user assignment.",
# "type": "string",
# "example": "deleted"
# }
# }
# }
module Polling
# @API PollSubmissions
# @beta
# Manage submissions for polls
#
# @model PollSubmission
# {
# "id": "PollSubmission",
# "required": ["id", "poll", "user"],
# "properties": {
# "id": {
# "description": "The unique identifier for the account role/user assignment.",
# "example": 1023,
# "type": "integer"
# },
# "poll": {
# "description": "The poll this submission is for. See the Polls API for details.",
# "$ref": "Poll"
# },
# "user": {
# "description": "The user that submitted the poll submission. See the Users API for details.",
# "$ref": "User"
# },
# "status": {
# "description": "The status of the account role/user assignment.",
# "type": "string",
# "example": "deleted"
# }
# }
# }
class PollSubmissionsController < ApplicationController
before_filter :require_user

View File

@ -15,39 +15,38 @@
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
# @API Polls
# @beta
# Manage polls
#
# @model Poll
# {
# "id": "Poll",
# "required": ["id", "course", "title"],
# "properties": {
# "id": {
# "description": "The unique identifier for the poll.",
# "example": 1023,
# "type": "integer"
# },
# "course": {
# "description": "The course the poll belongs to. See the Courses API for details.",
# "$ref": "Course"
# },
# "title": {
# "description": "The title of the poll.",
# "type": "string",
# "example": "A Sample Poll"
# },
# "description": {
# "description": "A short description of the poll.",
# "type": "string",
# "example": "This poll is to quickly determine what you've learned in the past hour."
# }
# }
# }
#
module Polling
# @API Polls
# @beta
# Manage polls
#
# @model Poll
# {
# "id": "Poll",
# "required": ["id", "course", "title"],
# "properties": {
# "id": {
# "description": "The unique identifier for the poll.",
# "example": 1023,
# "type": "integer"
# },
# "course": {
# "description": "The course the poll belongs to. See the Courses API for details.",
# "$ref": "Course"
# },
# "title": {
# "description": "The title of the poll.",
# "type": "string",
# "example": "A Sample Poll"
# },
# "description": {
# "description": "A short description of the poll.",
# "type": "string",
# "example": "This poll is to quickly determine what you've learned in the past hour."
# }
# }
# }
#
class PollsController < ApplicationController
include Filters::Polling