Entries tagged: rails

Mar 03

Rails - dump database structure for SQL Server

Dumping structure with _rake db:structure:dump_ task when connecting to SQL Server will fail with _scptxfr_ not found error.

Feb 16

Breaking the silence

Aug 14

PunBB to Beast converter

Aug 08

GetText to Gibberish rake task

Jul 06

Rails in practice - Compare records

Jun 20

Now on Mephisto

May 12

Rails in practice - Group records by condition

Apr 28

Create URL's outside of controllers and views

Mar 27

Customized Mongrel Startup Script

This shell script allows to start and stop bunch of "Rails":http://www.rubyonrails.com application on "Mongrel":http://mongrel.rubyforge.org/ webserver. This is "Tim Morgan's":http://timmorgan.org/ script, while I added ability to customize port, rails environment and directory for every app while respecting default values.

Feb 28

Override helpers in Rails

Feb 21

Running database migration individually

Jan 30

Help! Rails test cases do not remove fixture data

Jan 22

Capistrano can download from remote server

Jan 15

Backup remote database with Capistrano

Jan 10

Capistrano get method - download files from server

Dec 16

Working with dates in Ruby

Nov 24

Unit testing in Rails - state of database when test fail

After some code refactoring some tests failed. Ok, that means something in code is wrong and that is great thing to know. Usually it is enough easy to check the test case where the problem occured and fix code in model. However my yesterday problem was a bit complicated because the action that should change create and change objects from dependant models obviously didn't do that in in the way it should. It would be easiest method to find where problem is to check the state of database just before test failed.

Nov 13

Creating docs for Rails, Rails Edge, Plugins

Sep 13

Parsing european date format in Ruby/Rails

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.

Jun 05

Do not use 'puts' in Rails

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()

Mar 02

source on Rails