26 Mar '15, 3pm

Tips when writing an API in Ruby on Rails

Tips when writing an API in Ruby on Rails

At work we have settled into a pattern of splitting our frontend and backend into standalone JS applications at the front and Ruby on Rails at the back. This means I've been writing a lot of Ruby on Rails applications where the only real interface is an API. I've avoided purpose-built gems, instead using a fairly standard Ruby on Rails stack and adopting a few general practices. I've compiled some of these into the following tips. 1. Use Jbuilder for JSON responses Jbuilder is an official Ruby on Rails library for building JSON structures using a DSL. Add it to your Gemfile and you can write JSON responses using the full view stack Rails gives you. Jbuilder views look like this (taken from the Jbuilder README): # app/views/message/show.json.jbuilder json.content format_content(@message.content) json.(@message, :created_at, :updated_at) json.author do json.name @message.cre...

Full article: https://blog.jalada.co.uk/tips-when-writing-an-api-in-rub...

Tweets

Ruby / Ruby on Rails ビギナーズ勉強会で安川さんが、Railsチュートリア...

facebook.com 28 Mar '15, 7am

This content is currently unavailable This content is currently unavailable The page you requested cannot be displayed rig...

#Freelancer #seo Develop a plugin for a project...

freelancer.com 26 Mar '15, 3pm

We are using a web based school management system built on ruby on rails. More information here: [url removed, login to vi...

Applications Engineer in Ruby on Rails at: Germ...

jobs.rubynow.com 26 Mar '15, 3pm

Applications Engineer in Ruby on Rails at OmniScriptum Marketing DEU GmbH Saarbrücken, Germany Do you happen to have a deg...

Updated OpenShift QuickStart: Ruby on Rails 4. ...

hub.openshift.com 26 Mar '15, 7pm

An open source web framework for Ruby that is optimized for programmer happiness and sustainable productivity. It lets you...

Kijk eens naar de #vacature van Ruby on Rails O...

brunel.nl 27 Mar '15, 8pm

Als Ruby on rails Developer gedetacheerd worden door Brunel IT betekent dat je in dienst treedt bij Brunel. Bij Brunel IT ...

Today in #Ruby, #Rails, & #Python is out! Stori...

paper.li 26 Mar '15, 1pm

Today in #Ruby, #Rails, & #Python Today in #Ruby, #Rails, & #Python, by David Young: News from Rubyists and Pythonistas Pl...

'Top Tips For Writing a #Blog Post in 30 Minute...

hackerspace.lifehacker.com 25 Mar '15, 2am

I know you'll agree, it's the characteristic of this generation: toxic schedules! Sometimes we can't even have a decent di...

Develop a web application by gurugrv We have a ...

freelancer.com 28 Mar '15, 1pm

We have a school management system built on ruby on rails. It has an attendance system which sends notification sms to par...

@a_matsuda Great talk about #monolithic #rails ...

confreaks.tv 27 Mar '15, 8pm

The Recipe for the Worlds Largest Rails Monolith Akira Matsuda Rated: Everyone Viewed 234 times Tags: There are no tags fo...

Designing power systems for rail applications? This article at @ElectronicDesgn is a must-read:

Designing power systems for rail applications? ...

electronicdesign.com 26 Mar '15, 7pm

The use of rail-guided carriages dates back to hundreds of years before the industrial revolution. In 1825, the Stockton a...

Develop a plugin for a project based on Ruby on...

miraslowworld.com 26 Mar '15, 3pm

We are using a web based school management system built on ruby on rails. More information here: http://www.fedena.com It ...

In the mood to leave a comment? Check this out....

hackerspace.lifehacker.com 25 Mar '15, 5pm

I know you'll agree, it's the characteristic of this generation: toxic schedules! Sometimes we can't even have a decent di...

In the mood to leave a comment? Check this out....

hackerspace.lifehacker.com 25 Mar '15, 5pm

I know you'll agree, it's the characteristic of this generation: toxic schedules! Sometimes we can't even have a decent di...

#OC tweeps, @Payoff is #hiring a(n) Ruby on Rai...

hire.jobvite.com 27 Mar '15, 8pm

Ruby on Rails Engineer Costa Mesa, CA Ruby on Rails Engineer The Ruby on Rails Web Engineer will be responsible for develo...