Category Archives: Ruby on Rails

Book Review – Aptana Studio Beginner’s Guide

As I’ve previously said here , Aptana 3 is a Great IDE for web development.

As all powerful tools, it can be confusing at the beginning. Luckily¬†Pack Publishing has just released a new book called Aptana Studio Beginner’s Guide which can help you improving your Aptana skills.

aptana

From simple tasks, to heavy customization of the IDE, this book will guide you, through an example based approach, to boosting your productivity and accelerating your tasks with Aptana.

Aptana Studio 3 – A great Open Source IDE

It’s not easy to choose the right tools for our work. Today I’ll talking about the Aptana Studio 3.0.

Aptana Studio is an IDE based in Eclipse (built in java, thus multiplatform). I currently use Aptana Studio as my Rails IDE under Mac OS X and the experience, so far, has been great.

The syntax highlighting, the autocomplete ( among many other features ) turn this IDE into a productivity buster.You can download it here.

Including features such as GIT integration, built-in terminal, deployment wizard, integrated ruby debugger, its an excellent choice for web development.
Continue reading “Aptana Studio 3 – A great Open Source IDE” »

How to use reCaptcha Validation on Ruby On Rails

Security should always be an issue when it comes to computer applications.
Web applications and websites are even more exposed, so likely every weak spot will be exploited someday.

For years, web forms have been used by robots, spreading spam on most websites.

Captcha appeared in order to verify if the user accessing the form is human or not. It does that by showing an image with a text. The image cannot be converted into text by any OCR mechanism, but the human user is still able to read.

So how can we use recaptcha (www.recaptcha.net) with rails?
Continue reading “How to use reCaptcha Validation on Ruby On Rails” »

Custom foreign keys on Ruby on Rails Active Record

ActiveRecord, like all ORM’s, is one of the greatest things on earth, IMHO :)

By using the Convention or Configuration approach, ActiveRecord and even Rails, allows you to skip a few parts and go straight to what matters: the development.

sometimes, though, the “Sensible defaults” of rails and ActiveRecord are’t enough, but like most ORM’s, the convention can easily be overridden in order to get things done.

When you add a relationship between classes all you have to do is to add a references and has_many on the other side. If you follow the naming rules everything works.

Continue reading “Custom foreign keys on Ruby on Rails Active Record” »

How to create SEO friendly URL’s on your rails web application

When you are creating something for the web, you have to keep in mind that your website must be as easy to find as possible.

SEO, or Search Engine Optimization (http://en.wikipedia.org/wiki/Search_engine_optimization) should always be in your mind when designing and creating your website.

Lets imagine a blog. By default the route to each post would be something like:
http://domain.com/post/post_id
which works just fine.
But this is not SEO friendly, as the search engine crawlers won’t link the URL to the content.
Continue reading “How to create SEO friendly URL’s on your rails web application” »