I recently wanted to upload, edit, update and delete a video directly on youtube from my rails application. This can be achieved by YouTube Data API that allows application to perform functions normally executed on youtube. Step 1 : Demystifying Authentication with Google AuthSub Google provides an authentication service to those web applications that need to access services protected by a user’s Google account. I chose Googleâ€™s â€˜AuthSubâ€™ scheme for this. This also provides a high level of security to web application. The AuthSub interface provides several methods for acquiring and managing authorization tokens. Once a web application has received a token, it can request access to…
Guys, have you ever tried Rails.root. It gives same value as RAILS_ROOT. But now in edge rails it is modified and you can do much more with it.
You can use Rails.root at places like:
File.join(RAILS_ROOT, ‘public’, ‘images’)
Both gives the same result.
The view helper method capture provides this functionality to wrap a section of the view template in a variable and can be used multiple times in the view.
You can earn a lot, if you use your brain!
to know more!
If its needed to render a section of template code, we […]