Skip to content
This repository has been archived by the owner on Dec 31, 2019. It is now read-only.

Ruby on Rails #2

Closed
danieldocki opened this issue Dec 4, 2012 · 1 comment
Closed

Ruby on Rails #2

danieldocki opened this issue Dec 4, 2012 · 1 comment

Comments

@danieldocki
Copy link

How do I run an application in Ruby on Rails? is possible?

@thegengen
Copy link
Owner

Hi. I know this is a very old issue, but I'm going to reply here anyway, in case someone else comes accross it.

The cloudprint gem can be used in a Rails app, and that's why I wrote it initially. However, it can just as well be used from within a Sinatra app, or even a command line script.

WIthin a Rails app, you would generate an OAuth2 authorization link and show that to your users, and set up a controller action to which they would be redirected after authorizing your app. When they'd get there, you would save the code Google adds as a parameter to their request.

After exchanging that code for a refresh token, you would store it in a model somewhere and use it when calling CloudPrint.setup()

This project's README has since been updated, and I have some improvements planned to simplify all the OAuth2 goo one needs in order to use this gem.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants