Entries tagged: ruby

Feb 16

Breaking the silence

May 12

Rails in practice - Group records by condition

Feb 28

Override helpers in Rails

Dec 16

Working with dates in Ruby

Jun 19

Creating PDF documents with tables in Ruby, Rails

I started to use "Ruby FPDF":http://zeropluszero.com/software/fpdf/ to create PDF documents from our new Rails application "MojGost.com":http://www.mojgost.com. Ruby FPFD like it's "PHP counterpart":http://www.fpdf.org/ does not have methods for creating tables. However, there are many examples and scripts available and that allowed me to quickly write small Ruby module which adds few methods for easy table creation.

May 09

Overriding class methods in Ruby

Class methods in Ruby are methods that work without being tied to any particular object (Java and PHP5 have static methods for similiar purpose). Class methods are distinguished from instance methods by placing the class name and a period in front of the method name. One thing that may not be obvious if you want to inherit class method is how to call equally named class method from parent class.

Mar 31

Ruby / Rails alternative to PHP print_r() and var_dump()