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 702589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T03:44:15+00:00 2026-05-14T03:44:15+00:00

As I am learning more about rails, and breaking my design thinking from ASP.Net

  • 0

As I am learning more about rails, and breaking my design thinking from ASP.Net days, I was considering a scenario this morning but did not know if it was possible to do.

Practitioners have many Treatments through services – and vice versa

In my control Panel I have an area for Practitioners to edit their details (names, contact info etc) and can also choose their treatments via check-boxes.

I would like to remove the check-boxes from the Practitioners _form. Having their own form which I could call on like this:

<%= link_to "Edit Treatments", edit_practitioner_treatments(@practitioner) %>

However, from an admin point of view I would still need to be able to manage treatments without a practitioner object in sight:

<%= link_to "Edit Treatments", edit_treatments(@treatment) %>

which also has authentication barriers.

  • Is there an easier solution to extract treatments I have overlooked?
  • Is it possible to have nested routes just some of the time?
  • Did I have too much coffe this morning and are therefore currently in a state of insanity?
  • 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. Editorial Team
    Editorial Team
    2026-05-14T03:44:16+00:00Added an answer on May 14, 2026 at 3:44 am

    Generally when considering admin functions, which often present an entirely different interface to the user with permission checking based more on “will this break something” than “should you be allowed”, it is advantageous to create an admin area with separate controllers. For example:

    map.namespace :admin do |admin|
      # Admin::PracticionersController
      map.resources :practicioners
    
      # Admin::TreatmentsController
      map.resources :treatments
    end
    
    map.resources :practicioners do |practicioner|
      practicioner.resources :treatments
    end
    
    map.resources :treatments do |treatment|
      treatment.resources :practicioners
    end
    

    All Admin::* controllers can inherit from something such as Admin::BaseController that performs sufficiently rigorous authentication checking before allowing any actions to be performed.

    In most applications I’ve seen, the user-facing front-end has an element of design or style to it, where they layout is often hemmed in by navigational elements, advertising, or other editorial content. Creating a separate admin view that’s uncluttered, shows far more information per page, and allows sorting or searching on dimensions not exposed to the user is very valuable when managing even medium-sized sets of data.

    Although it might seem like a lot of work to make these extra admin controllers and their associated forms, if you are careful in your design, you can recycle a lot of the functionality between the two areas, especially page partials.

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

Sidebar

Related Questions

I'm using Java 6 for learning more about web Services (JAX-WS). I also read
I have been learning more and more javascript; it's a necessity at my job.
Is is that I'm a newbie learning Ruby, or does it really have more
I'm designing an application that supports plugin development. Its more of a learning exercise.
Learning WPF nowadays. Found something new today with .Net dependency properties. What they bring
Learning a little about T-SQL, and thought an interesting exercise would be to generate
Learning from my last question , most member names seem to get included in
Im learning lisp and im pretty new at this so i was wondering... if
I'm just learning about custom controls in C# (window forms) I've created the below
Preface I'm learning about computer math by writing and refining my own BigInt library.

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.