28
Jul 13

Refactoring Flash Message & Writing Helpers

In rails flash provides a way to pass temporary objects between actions. Anything you place in the flash will be exposed to the very next action and then cleared. It is used for showing notices and alerts e.g flash[:notice] = “Post successfully created” I will be editing the blackbook demo app’s flash message, so that [...]


28
Jul 13

Test driven development with rails

As a real fan of test driven development (TDD) I was interested in finding out how rails takes care of testing within its applications. In this section, I will be writing test to cover validations. Still working with my blackbook demo app, I wanted to test that user cannot save record without supplying first_name, last_name [...]


27
Jul 13

Creating Classes, Objects, and Variables in Ruby.

So my task today was to focus on establishing all the required basics in constructing classes and instantiating objects from those classes and seeing what I can do with these objects ruby style. 1 2 3 4 5 6 class Animal def initialize(name, nickname, sound) @name = name @nickname = nickname end end That is [...]


22
Jul 13

Object Oriented Ruby

I wanted to find out how to create classes and objects in ruby so I started with the ruby documentation and google. I was interested in finding out exactly what objects mean to ruby and then compare it to how other languages like PHP, Java, Python deal with objects, by this I am referring to [...]