Forum: Ruby on Rails Where to put pages not baked by controllers

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Cesidio D. (Guest)
on 2007-08-02 14:52
I am developing an application that supports internationalization. I
have public pages (in public folder) that are not backed by any
controller, but I need them to be rendered in the correct locale and to
apply a layout to them. Do you have any workaround to it? Where should I
place this pages in order to be executed as .rhtml but without going
through any controller?
Thanks
Adrian M. (Guest)
on 2007-08-02 14:59
(Received via mailing list)
I don't know of a way to have controller-less pages in Rails but you can
use
something like Merb or Camping alongside Rails to do Erb processing.

Hope it helps,


AEM

On 8/2/07, Cesidio Di landa <removed_email_address@domain.invalid> wrote:
> Posted via http://www.ruby-forum.com/.
>
> >
>


--
Adrian Esteban Madrid
Jeff E. (Guest)
on 2007-08-03 06:21
(Received via mailing list)
how about letting apache serve them & use mod_rewrite (or whatever is
the appropriate apache handler for internationalization)

On Aug 2, 6:52 am, Cesidio Di landa <removed_email_address@domain.invalid>
Pratik N. (Guest)
on 2007-08-03 16:49
(Received via mailing list)
You can just add a controller to server such pages. You don't need to
add actions for each pages. Just put those templates inside
controllers's view directory and rails will serve them as rhtml even
if you don't have an action defined.

It's a nice idea to have a controller as it'll let you do caching
easily.

On 8/2/07, Cesidio Di landa <removed_email_address@domain.invalid> wrote:
>
> >
>


--
Cheers!
- Pratik
http://m.onkey.org
This topic is locked and can not be replied to.