2010/7/24 Marcos Vanetta <[email protected]>:
> Amigoxs,
> En rails, ¿Cómo hago para llamar / probar helpers de vistas desde la
> consola? Y en el mejor de los casos, acceder a mis propios helpers :)
>
>
>>> ma...@malev-laptop:~/code/rails-learning/testing$ ruby script/console
> Loading development environment (Rails 2.3.8)
>>> link_to "hola mundo", "#"
> NoMethodError: undefined method `link_to' for #<Object:0xb760b94c>
>        from (irb):1
>>>
>
> Saludos!
> malev
> --
> https://launchpad.net/~marcosvanetta
> http://blog.malev.com.ar
> twitter: @malev
> _______________________________________________
> Ruby mailing list
> [email protected]
> http://lista.rubyargentina.com.ar/listinfo.cgi/ruby-rubyargentina.com.ar
>

Podés usar el objeto helper:

Loading Configuration...
>> helper.link_to 'Example', 'http://www.example.com/'
=> "<a href=\"http://www.example.com/\";>Example</a>"
>>

Éxitos con eso.


      mqt
_______________________________________________
Ruby mailing list
[email protected]
http://lista.rubyargentina.com.ar/listinfo.cgi/ruby-rubyargentina.com.ar

Responder a