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

  • SEARCH
  • Home
  • 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

I am new to Rails and i'm working on my first rails application that
Working on my first Rails project, I used Ryan Bates' Nifty-Generators to create the
I am working on a rails application that uses big javascript libraries (e.g. jquery
I'm working on a Rails application with some budget features... What i want to
First I'm quite new to ruby and rails... I have a little application working
Our team is working on a new application that we started with Rails 3.1
I'm working on my first Rails Application. I am a little stuck with the
I want to create a Rails application which exposes an API to be consumed
I'm working on deploying my first Rails application right now, and somewhere along the
I'm working on my first rails app deploy and the database data from my

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.