Edge Rails: action_name

Publicado por Carlos Brando em 15 de Maio de 2008

Agora para saber qual action foi chamada durante a execução de sua view ficou mais fácil, basta usar o método action_name:

<%= action_name %>

O retorno será o mesmo que pegar o params[:action], mas de uma forma mais elegante.

Tradução do Why’s (Poignant) Guide to Ruby no Twitter

Publicado por Carlos Brando em 14 de Maio de 2008

Acompanhe a tradução do livro Why’s (Poignant) Guide to Ruby pelo Twitter!

Clique aqui.

The Autotest Notification Gem 1

Publicado por Carlos Brando em 14 de Maio de 2008

This gem set the autotest (ZenTest) to send messages to software as Growl, LibNotify, and Snarl, displaying a window with the results.

http://github.com/carlosbrando/autotest-notification/

Requirements

Independent of operating system you are using, you must install the ZenTest.

gem install ZenTest

If you’re using a Mac

You need to have Growl and growlnotify installed on your machine.

Download the Growl and install it like any other application on your Mac

Then you must install the growlnotify.

In your shell, cd to the directory on the Growl disk image containing growlnotify, and type ./install.sh. That script will install growlnotify to /usr/local/bin and the manpage to /usr/local/man.

If you’re using Windows (with cygwin)

You need to have Snarl and sncmd installed on your machine.

Download Snarl and install it like any other application on your machine.

Then download sncmd open the zip file and place
the executable from the zip in any directory in windows PATH (for example c:\windows).

If you’re using Windows (without cygwin)

You need to have Snarl, diffutils and ruby-snarl installed on your machine.

Download Snarl and install it like any other application on your machine.

Download DiffUtils for Windows and follow the installation instructions on the site.

Run in the command prompt: gem install ruby-snarl

After all that. You must update the environment variable PATH with the path to the bin of diffutils.

It’s the price that was paid for using Windows (try cygwin).

If you’re using Linux

You need to have libnotify binaries installed.

For ubuntu this means: sudo apt-get install libnotify-bin

Other distributions may package it with other names, do a search for libnotify using your distribution package manager.

If you use KDE and do not have libnotify-bin installed, it will try to use kdialog wich is part of KDE. It also works if you have zenity installed.

Install

sudo gem install carlosbrando-autotest-notification --source=http://gems.github.com

Run it to let the notifier in automatic mode:

an-install

In Windows without cygwin, it’s necessary to install in the directory of the project:

an-install -p C:\projects\my_project

To turn off the notifier:

an-uninstall

Contributors

Why’s (Poignant) Guide to Ruby em Português - Quem vai querer? 3

Publicado por Carlos Brando em 14 de Maio de 2008

Se me perguntarem quais são os melhores livros sobre Ruby, o livro Why’s (Poignant) Guide to Ruby com certeza estará na minha lista.

Este post é uma convocação. Vamos traduzir o livro. O Akita já explicou como isto vai funcionar no blog dele, então não vou repetir. Vamos usar o GitHub para isto, então crie uma conta lá e faça um fork, depois é só enviar requests com as traduções.

O livro foi dividido em pequenos arquivos, o que vai facilitar muito a tradução. O GitHub permite comentários em cima dos commits, então abuse deste recurso para ajudar os tradutores.

Vamos lá, tenho certeza que será divertido!

Dreamhost agora aceita mod_rails 3

Publicado por Carlos Brando em 13 de Maio de 2008

Simples assim: