Delicious with Ruby on Rails – JSON

I recently (well about a month ago!) read a very good post that informs you how to add your delicious links to your rails app.

I was using that method and all was well, until I got a request that the links should open in a new window. With the simple html access to my links, that was not an option you can pass. So I had to resort to using something more complicated; JSON seemed the easiest for me to read in and manipulate.

I would advise you to follow this tutorial and then come back here and see how the code can be changed to use JSON instead of the HTML api.

You will need to install the JSON ruby library first.

gem install json

If that does not work just download it from here and run the install script.

Here is the modified method (I have posted it in Pastie, all my future code samples will be in Pastie)

http://pastie.caboo.se/13083

Advertisements

No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: