App controllers and ComatoseController

0 views
Skip to first unread message

tjst...@gmail.com

unread,
Nov 2, 2008, 1:14:22 PM11/2/08
to Comatose Plugin
Glad to see some new activity here. Good timing for me as I'm working
on an app that I *think* Comatose is a good fit for. I'm running into
a problem and I'm hoping for some feedback from the group...

Given the following page structure:

Root
|
+-- Buyers
|
+-- Services # mixed content
+-- FAQ # 'pure' content

I'd like the Services page to be 'mixed' content, i.e., an erb
template with an inline render :comatose call. That's simple enough: I
have a BuyersController and a views/buyers/services.html.erb view.
The default :controller/:action/:id route is used.

Where I'm unclear on is the best approach to the FAQ page. The request
for 'buyers/faq' needs to get through to the ComatoseController. I'd
like to do this without hardcoding a bunch of stuff in routes.rb. I've
tried a couple different approaches, and will continue to do so until
I come up with one I'm happy with, but was hoping someone has
encountered this and wouldn't mind sharing how they solved it.

Thanks,

-TJ

TJ Stankus

unread,
Nov 13, 2008, 9:40:47 PM11/13/08
to Comatose Plugin
Figured I'd reply with what I ended up doing... the simplest way to
get around this issue is to just explicitly define routes for methods
you don't want to fall through to ComatoseController. I tried a couple
different things that ultimately worked, but this method produced the
least amount of code.

-TJ
Reply all
Reply to author
Forward
0 new messages