I have the students assigning to parents, the parents are able to come
login… it’s great.
That’s the functional part. As I get more of it working I am sure I’ll
have questions about that.
Until then:
What do I do for the “static” files on the site. For every site you
build don’t you have an “About” a “Contact” and “Help” page? Things
right off the root? Right now I have them in the Application directory
and a route points ‘/:action’ to :controller => Application (or
something like that, I’m home now instead of in my office).
I want them to all have the layout from the rest of the site,
obviously.
I have the students assigning to parents, the parents are able to come
login… it’s great.
Rails rules like no web platform has ruled before. Welcome to the inner
circle who no longer need to be told that!
Now how are your unit tests?
What do I do for the “static” files on the site. For every site you
build don’t you have an “About” a “Contact” and “Help” page? Things
right off the root? Right now I have them in the Application directory
and a route points ‘/:action’ to :controller => Application (or
something like that, I’m home now instead of in my office).
I never heard of the Application object used directly as a controller.
Put them in the most convenient app/view/controller/ folder, and name
them
all .rhtml. Don’t bother to write their actions, and access them by
default
route - /controller/help, /controller/contact, etc.
Or put them, as raw html, in /public/, and link to them from /. But this
requires the .html extension, which is tacky.
What do I do for the “static” files on the site. For every site you
build don’t you have an “About” a “Contact” and “Help” page? Things
right off the root? Right now I have them in the Application directory
and a route points ‘/:action’ to :controller => Application (or
something like that, I’m home now instead of in my office).
I want them to all have the layout from the rest of the site,
obviously.
Is there a usual method for this?
My understanding is you still need to (or normally would) use
controller/action.
So if you put those at /company/about, /company/contact you would
still create a Company controller, it just wouldn’t do very much.
As for giving all pages the same look, I’ve been exploring how to do
this in Rails, and just finished writing an article about it (still
some unanswered questions, but I’ll get to those).
What do I do for the “static” files on the site. For every site you
build don’t you have an “About” a “Contact” and “Help” page? Things
right off the root? Right now I have them in the Application directory
and a route points ‘/:action’ to :controller => Application (or
something like that, I’m home now instead of in my office).
I think it’s a good idea to use a single controller for all these, but
don’t use ‘application’, since that’s a base class for your other
controllers. Call it ‘static’ or something.
You can use caching on these pages if they are truly static.
Also, use named routes instead of a catch-all route.