classroom

https://github.com/education/classroom

Ruby

GitHub Classroom automates repository creation and access control, making it easy for teachers to distribute starter code and collect assignments on GitHub.

InvitationHelper.attributes

Public: Return the attributes needed
to render the invitation copy url parial

invitation - An AssignmentInvitation or GroupAssignmentInvitation

Examples

InvitationHelper.attributes(assignment.invitation, request.base_url)
#=> {
     :type => "assignment_invitation",
     :key  => "7309ffd1f7b5e7af09dfcd11fab371d7",
     :url  => "http://github.dev/assignment-invitations/7309ffd1f7b5e7af09dfcd11fab371d7",
    }

Returns a Hash of attributes

Source | Google | Stack overflow

Edit

git clone [email protected]:education/classroom.git

cd classroom

open app/helpers/invitation_helper.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-InvitationHelper-attributes-for-pr


# Commit to git

git add app/helpers/invitation_helper.rbgit commit -m "better docs for InvitationHelper.attributes"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-InvitationHelper-attributes-for-pr

hub pull-request


# Celebrate!