SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Enthusiast
    Join Date
    Jan 2006
    Posts
    97
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    RoR Homepage Question

    What's the standard practice for creating application homepages if it's not designed as a part of an existing controller? For example, I want to include data from multiple controllers on my homepage. Do you just create an index controller specifically for that purpose?

    Thanks!

  2. #2
    SitePoint Zealot
    Join Date
    Jul 2005
    Posts
    124
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's fine, I call mine a dashboard. By the way, the link in your signature appears to be hacked.

  3. #3
    SitePoint Enthusiast
    Join Date
    Jan 2006
    Posts
    97
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by IAIHMB
    That's fine, I call mine a dashboard. By the way, the link in your signature appears to be hacked.
    Do you use that for all your static pages then? Like "About Us", "Learn More", etc?

    Thanks for letting me know about the hacked forum too... don't these people have better things to do?

  4. #4
    SitePoint Zealot
    Join Date
    Jul 2005
    Posts
    124
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nah, I used dashboard on a project that I'm currently working on, but it varies on a project by project basis. You really can't go wrong, you could have a static controller with about and information actions.

  5. #5
    SitePoint Enthusiast
    Join Date
    Jan 2006
    Posts
    97
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by IAIHMB
    Nah, I used dashboard on a project that I'm currently working on, but it varies on a project by project basis. You really can't go wrong, you could have a static controller with about and information actions.
    Alright, cool, thanks! Also, thanks for letting me know about Mongrel on that other thread - works like a charm, and a lot easier/faster for development. I think I'm going to use it with LiteSpeed when I deploy...

  6. #6
    SitePoint Zealot
    Join Date
    Jul 2005
    Posts
    124
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I should probably clear a few things up, I was a bit pressed for time. If I had a controller named static with about and information actions I would probably route /about to the static controller's about action and /information to the static controller's information action (As apposed to /static/about and /static/information.). You could generate a controller for each, but that's not good practice.

    LiteSpeed is really nice, don't forget to set contexts for your static content.

  7. #7
    SitePoint Enthusiast
    Join Date
    Jan 2006
    Posts
    97
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by IAIHMB
    I should probably clear a few things up, I was a bit pressed for time. If I had a controller named static with about and information actions I would probably route /about to the static controller's about action and /information to the static controller's information action (As apposed to /static/about and /static/information.). You could generate a controller for each, but that's not good practice.

    LiteSpeed is really nice, don't forget to set contexts for your static content.
    Yeah, I'm having the index controller do all of that, then modified routes.rb to point to it... works great! Thanks for the tips.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •