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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T23:30:03+00:00 2026-05-28T23:30:03+00:00

I have a rails project where users sign up and login. Users will create

  • 0

I have a rails project where users sign up and login. Users will create “Music” so I have a “Music” controller, the user will fill in a title, and upload their MP3. Every user can do this — this is dandy.

When a user logs in I want them to see everyone’s uploaded music in a nice list view at http://example.org/explore. I will have some “latest additions since your last login” somewhere on the sidebar of this “explore” page in the future among some other features.

My question is, should I create a controller called “Explore” with an index action for this listing with something like the following?

class ExploresController < ApplicationController

  def index
    @music = Music.all
  end

  def show
  end
end

I thought this might be the right way to do this but it seems odd to have the “Explore” controller be using all of the actions you’d typically see in the “Music” controller. The Music controller is going to be CRUD for the current_user.

  • 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-28T23:30:04+00:00Added an answer on May 28, 2026 at 11:30 pm

    You can easily have the music#index method available to everyone and put user authentication on the CRUD methods. That way everyone can see all the uploaded music on the /music page, but only the owner of each one can alter them.

    If users need an easy way to see a list of use their own mp3s then you can just use a nested resource, so it would be available at /users/:id/music.

    If you need some more info on how to implement that stuff then leave a comment. The specifics would depend on what (if any) authentication systems you were using.

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

Sidebar

Related Questions

I'm working on a Rails project where I want to allow users to create
In a rails project I have two entities, Users and Institutions, they have a
Im working on a simple rails project were users have an attribute called is_admin,
In my Rails 3 project I have: namespace :admin do resources :users end scope
I have a rails project. I scaffolded Site and Server, their models are below.
I have a Rails 3 project with Devise, confirmable enabled so the user has
I have a rails 3.1 project using devise for authentication. I have several user
In my project rails have a CRUD for Users, when i am in the
I have a Rails project which I neglected to build tests for (for shame!)
I have a Rails project which has a Postgres database for the actual application

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.