Rjs ruby

Is it Possible to write pure ruby code in rjs templates?
something like

…rjs stuff
if apple != oranges
…rjs stuff
else
…rjs stuff

or am i totaly off the track?
thanks in advance,

harp

Yes.

c.

harper wrote:

Is it Possible to write pure ruby code in rjs templates?
something like

…rjs stuff
if apple != oranges
…rjs stuff
else
…rjs stuff

or am i totaly off the track?
thanks in advance,

harp

Yes for the “am i off track?” or Yes for the “Is it possible to…”

?

harp

Cayce B. wrote:

Yes.

LOL - sorry, your last “am I off track?” comment just didn’t register
when I read the post.

Yes, the RJS template is pure ruby and you can include additional ruby
code in it. Keep in mind you can run RJS commands at the page object
inline from your controller, as well as from a separate .rjs template,
so yes it is pure ruby.

I can’t recommend the Fauser .pdf download at
http://www.oreilly.com/catalog/rjsrails/ enough to folks starting with
RJS - it will enlighten you with all things RJS. Way worth the $10.

c.

harper wrote:

Yes for the “am i off track?” or Yes for the “Is it possible to…”

?

harp

Cayce B. wrote:

Yes.