RJS problem

I have an odd problem while trying to use a simple rjs.

_test.rjs : page.alert “test”

test.rhtml:

When I am attempting to view controller/test the page comes as if it was
a
text file.
So i am actually seeing:

...

Any ideas?

Bogdan I. wrote:

I have an odd problem while trying to use a simple rjs.

_test.rjs : page.alert “test”

test.rhtml:

When I am attempting to view controller/test the page comes as if it was
a
text file.
So i am actually seeing:

...

Any ideas?

I’m pretty sure it’s because you’re rjs is called _test.rjs? It should
just be called test.rjs.

-Ben L.

Ben L. wrote:

Bogdan I. wrote:

I have an odd problem while trying to use a simple rjs.

_test.rjs : page.alert “test”

test.rhtml:

When I am attempting to view controller/test the page comes as if it was
a
text file.
So i am actually seeing:

...

Any ideas?

I’m pretty sure it’s because you’re rjs is called _test.rjs? It should
just be called test.rjs.

-Ben L.

that and also you don’t need to render the partial test. As soon as you
call the action test, it automatically calls the controller action, any
rjs file called test.rjs, and any rhtml file called test.rhtml. So no
need to render, the alert in test.rjs will go as soon as u go to
www._./controller/test

That still does not explain why it does not do it properly.
And renaming _test.rjs to test.rjs (and removing render_partial) did
not
help. In fact, test.rjs is not being included at all.