Recently I’m working with multistep form validation so I just want to throw this out here. This tutorial is done using Rails 3.1 with jQuery and CoffeeScript, but it can also be done by any web framework. The validation engine is done using jQuery validation plugin. A powerful plugin written and maintained by Jörn Zaefferer, a member of the jQuery team.
Recently, we were looking for a tool that generate the API documentation that integrated into the Rails code base. We found RAPI Doc, which is initially started by Jaap van der Meer. Quoting from his blog post,
It generates a API controller containing documenation maked up in a special language. It parses controllers you specify, and generates a ApiController with appropriate views for it. This makes it very easy to document a Rest API.
Recently I was tasked with creating a recurring billing system for one of our projects, I thought I would share.
I decided to use Active Merchant a fantastic ruby library for handling payments from the studs over at Shopify. I’m using Paypal’s gateway for normal one time purchases as well as express payments, however at time of writing this Active Merchant doesn’t support Paypal for recurring billing so I’m using Authorize.net, a well established gateway with a good …
A snazzy inset line can go a long way to making your design feel like it lives in a three dimensional world. I’m going to show you how I’ve been accomplishing this effect using CSS3′s super amazing box-shadow property.
Imagine you want to serve a page with a list of auctions and you want to keep your users aware of what’s happening. For example when someone clicks the buyout button you want to let them know that the auction is sold out, and remove it from the page in real time. Imagine you have thousands connected users and hundreds auctions, how do you prevent the system from collapsing?
The answer is probably the bayeux protocol. There are several implementation …
Rails 3.0.6 has just been released today after an important XSS security issue had been addressed. The auto_link method had previously been automatically marking input strings as html safe even if from an unknown origin. Upgrade encouraged for anybody riding rails pre 3.0.6.
Ruby on Rails, Rails, Ruby, RoR – there’s a lot of ways of saying it, and there’s a lot of ways of using it. RubyGlob is the extension of the ELC Technologies developer blog into a full blown web publication. Why? We love the environment, we love sharing our knowledge with the community, and most of all, we’d like to encourage more people to join our enthusiasm, as well as blog with us.
That wasn’t quite possible when we were just …
Heroku is great for rapid application development but if you want to run multiple databases it doesn’t provide any options. Running multiple databases in a master-slave orientation can provide an elegant solution to many scaling issues. This can be accomplished on heroku using my forked version of schoefmax’s gem multi_db.
First a quick look at master-slave replication
This database setup utilizes one or more read database(s) that only service read requests, and a master database that takes care of the …
The arguments object in JavaScript looks like an array, but really it is just an array-like object. It has a length property that returns the number of arguments supplied to the calling function. And callee, which actually returns the calling function. Like an array, you can access the elements using an index:
// Remember, in JavaScript you can pass as many arguments
// to a function as you want.
function example() {
for(i=0; i < arguments.length; i++) {
console.log(arguments[i]);
…
In starting a new JavaScript plugin, my coworker (Enrico Rubboli) and I began by looking at various design patterns to determine what would best suite our needs. After a bit of research we decided to go with the self executing module pattern. For example we have something like this (edited for brevity):
var Journal = (function() {
// Private variables and methods go here
return {
…
Workout of the Day