Resurrected from the archive, Xavier said:
> Or just create a 'static' controller with one action per static page,
> then just put your static content in app/static/action_name.rhtml and
> use routes.rb to have cute URLs.  That way you can also leverage all
> the layout mechanism.

I've just implemented something very like this on my own local copy.  It looks 
like it _should_ be pretty simple:

class StaticController < ApplicationController
    def contact
    end
end

But realistically, that won't actually work, it bombs out not being able to 
find the Category class.  Funnily enough, the following works:

class StaticController < ApplicationController
    def contact
        Category.find_all
    end
end

This is all just temporary though.  Really, I was thinking that static pages 
should be stored in the database and CRUD via the admin interface.  I should 
get around to it and if/when I do I'll contribute back anything which doesn't 
suck. ;-)

Finally, does anyone have suggestions on how to manage this sort of hackery?  
For instance, if I just change the links on my site, I need to update 
app/views/shared/_links.rhtml, but then when the next version of Typo comes 
out it's bound to get squashed so I'd have to patch over my changes again.  
CVS wouldn't be quite enough... it's like I need some kind of patch-based 
versioning system.

Either that or we modify Typo until everything user-defined is in the database 
(including the theme?) ;-)

TX

-- 
             Email: Trejkaz Xaoza <[EMAIL PROTECTED]>
          Web site: http://trypticon.org/
         Jabber ID: [EMAIL PROTECTED]
   GPG Fingerprint: 9EEB 97D7 8F7B 7977 F39F  A62C B8C7 BC8B 037E EA73
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : 
http://rubyforge.org/pipermail/typo-list/attachments/20050705/18fb992c/attachment.bin
From robby at planetargon.com  Wed Jul  6 15:33:46 2005
From: robby at planetargon.com (Robby Russell)
Date: Wed Jul  6 16:02:54 2005
Subject: [typo] handling amount of comments
In-Reply-To: <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>
        <[EMAIL PROTECTED]>
        <[EMAIL PROTECTED]>
        <[EMAIL PROTECTED]>
        <[EMAIL PROTECTED]>
Message-ID: <[EMAIL PROTECTED]>

On Sat, 2005-06-18 at 14:36 -0700, Robby Russell wrote:
> On Sat, 2005-06-18 at 17:15 -0400, Tobias Luetke wrote:
> > whats really weird is that i had 500 comments once myself and it
> > didn't cause any grief other then long scrolling. Anyways, once static
> > caching is in its no problem. I'm not so sure about pagination, i
> > always dislike it and I think its really rare that a blog gets over
> > 100 posts in normal operation.
> > 
> > Hrm.
> 
> I'd think that with over 100 comments of un-threaded comments would be
> painful to look at on one screen anyways.
> 
> While we're at it, what about threaded comments? I prefer this form of
> comment viewing/responding. (especially when the number of comments gets
> larger)

I wanted to follow up on this a bit more. I realized that we could
easily add another field to the articles table called 'comment_count' so
that we could utilize the counter cache. For some reason, when Curt logs
into his admin area, it times out because the number of comments is in
the several thousand. Do you think that this would help things?

-Robby

-- 
/******************************************************
* Robby Russell, Owner.Developer.Geek
* PLANET ARGON, Open Source Solutions & Web Hosting
* Portland, Oregon | p: 503.351.4730 | f: 815.642.4068
* www.planetargon.com | www.robbyonrails.com
*******************************************************/

Reply via email to