How do I test actionview helpers in the console?

I would like to see the output of actionview helper methods, to be able
to play with it.

When I do the following in the console:

collection_select(“job”, “client_id” , @clients, “id”, “name”)

I get:

NoMethodError: undefined method `collection_select’ for
#Object:0xb7cf1970

I’d like to get something like:

Francisco Hernandez James E.

Is this possible?

TIA,

Erik.

Francisco Hernandez James E.

Is this possible?

To my knowledge (I had a recent question about testing helper that call
ActionView helper methods) you have to do some includes to get things
visible. IIRC:

include ActionView::Helpers::TagHelper
include ActionView::Helpers::UrlHelper

Not sure if more are needed or not.

Rick

http://www.rickbradley.com MUPRN: 988
| at times when the
random email haiku | search indexer isn’t running
| (which was my first guess).

On Fri, 2006-02-10 at 13:18 +0100, Erik T. wrote:

#Object:0xb7cf1970

I’d like to get something like:

Francisco Hernandez James E.

Is this possible?


http://rails.rubyonrails.com/classes/ActionView/Helpers/FormOptionsHelper.html#M000352

(hint - click ‘show source’)

hey…I’m starting to learn these things

Craig