Skip to content

Instantly share code, notes, and snippets.

@ozgun
Created June 24, 2015 06:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ozgun/0cfae18b5a95a31cad28 to your computer and use it in GitHub Desktop.
Save ozgun/0cfae18b5a95a31cad28 to your computer and use it in GitHub Desktop.
Ruby: module_function
module AuthHelperMethods
# Call callback_url method from inside another class as below:
#
# AuthHelperMethods.callback_url('a', 'b', 1)
#
def callback_url(base_url, provider, app_id)
[base_url, "/members/auth/#{provider}/callback/#{app_id}"].join
end
module_function :callback_url
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment