Skip to content

Instantly share code, notes, and snippets.

@kurko
Created June 3, 2015 19:46
Show Gist options
  • Save kurko/0e97c8cb083ec9bec56f to your computer and use it in GitHub Desktop.
Save kurko/0e97c8cb083ec9bec56f to your computer and use it in GitHub Desktop.
# Given
# /auth/:section_token/?redirect_url=:redirection_with_token/?option=:option
entity = Instructor.find(5)
# this is a token that expires
confirmation_token = TokenModel.new_for_entity(
entity_id: entity.token,
type: :confirmation
)
AuthUrl.new(
token: section_token,
redirection: "confirm_relationship/#{confirmation_token}"
option: :confirm
).to_s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment