photo credit: alexanderdrachmann I was recently helping a friend out with his Rails project and we were trying to figure out the best way to handle queries in a RESTful Rails app, i.e. returning a subset of items meeting certain conditions. After a bit of poking around, here’s what looks like the most promising convention [...]
Continue reading about Best practice RESTful queries in Rails
Here’s a post about Outside.in recently switching from PHP to Rails.Interestingly, they cite access to GIS functionality as one reason for the switch.After the switch, their hosting costs were roughly the same as before and their codebase was down to just 20% of its former size!
Here’s another little problem I was just hitting and the solution in case it happens to help someone else out there. If you’re trying to use a plugin (in this case the restful_authentication plugin) and you’re hitting an error like this when you use ./script/generate: “Couldn’t find ‘authenticated’ generator” Check to make sure that you [...]
Continue reading about Fix for "Couldn’t find ‘authenticated’ generator"
Today I decided to get my head around REST and, more specifically, whether and how I should use it in my Rails development projects. REST (or REpresentational State Transfer – see Wikipedia), is all about resources. As I understand it, in a perfectly RESTful application, every object is resource with a unique identifier (in this [...]
It’s really very simple, but this one took me a while to figure out, so I thought I’d post it in case it helps someone else. If you want to add a rel=’nofollow’ attribute to a link generated with a Rails helper, you just need to specify it in the html_options hash argument to link_to [...]
Continue reading about How to add nofollow to links in Rails
This is some code I wrote to send data from a javascript object (on a browser) to a Rails application on a server. [My aim was to use the Google AJAX search API and a Google local search controller to search for and select business locations that I then wanted to store away in a [...]
Continue reading about Sending data from browser to server with javascript and JSON