template rendering with no action rails 1.2.3

I was recently on IRC and someone suggested that it was a feature for a template to be able to render, where no action exists.

If this is true, any way to control that feature? I would like to turn it off.

Mike B.

I was recently on IRC and someone suggested that it was a feature for a template to be able to render, where no action exists.

if you have a 'list.rhtml' template in app/views/foos/ then rails will assume you wanted a list action in FoosController

If this is true, any way to control that feature? I would like to turn it off.

No, but you could just make a private method called list. That should hide it.

Quoting Michael Koziarski <michael@koziarski.com>:

I was recently on IRC and someone suggested that it was a feature for a template to be able to render, where no action exists.

if you have a 'list.rhtml' template in app/views/foos/ then rails will assume you wanted a list action in FoosController

If this is true, any way to control that feature? I would like to turn it off.

No, but you could just make a private method called list. That should hide it.

That was my initial thought, however, it doesn't. What does work is to make the template a partial (using underscore). There were a few other suggestions in the chat as well.

The other idea I liked was to create a method with the same name as the template and do a raise in it. I didn't test it, but that sounded like a good idea.

Thanks for giving this some time.

Mike B.

What about #hide_action?

http://rails.rubyonrails.org/classes/ActionController/Base.html#M000259