Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 157423
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T10:30:05+00:00 2026-05-11T10:30:05+00:00

I am working on my first Rails application and want to create an admin

  • 0

I am working on my first Rails application and want to create an admin section.

Do I want to keep my views and controllers completely separate (that is, in separate directories) for the admin section and the rest of the site?

How can I organize my views/controllers in custom directories (how do I configure the routing)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T10:30:06+00:00Added an answer on May 11, 2026 at 10:30 am

    You could also keep the apps and controllers in their usual places and use Rails filters to control access, which is what I think you’re looking for here.

    If you have the AWDWR Book handy, flip to Chap11 Task F Administrivia

    • Basically define an authorize method in app\controllers\application.rb, which checks authorization, redirects to login page if not logged in et.all
    • Mark controllers you want to restrict access to with before_filter s

    .

    class AdminController < ApplicationController    before_filter :authorize    #  ... the rest of the code end 

    This will intercept all calls to actions defined in AdminController and force them to go via authorize

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Working on my first Rails project, I used Ryan Bates' Nifty-Generators to create the
For a new SaaS app that I'm working on, I want the end user
So I just started my first rails project yesterday. I had two many-to-many (has_and_belongs_to_many)
Hey guys. I'm creating a rails app and being one of the first times
First a bit of background. I have been working on the MS platform for
I have built a blog application using Ruby on Rails. In the application I
I have a rails app that has asynchronous processing, and I'm having trouble getting
So I'm working with authlogic, and I'm trying to duplicate the login functionality to
I need some advice with my desired setup with git and Rails. Basically for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.