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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T16:48:23+00:00 2026-05-14T16:48:23+00:00

I have a rails model called ‘audioclip’. I orginally created a scaffold with a

  • 0

I have a rails model called ‘audioclip’. I orginally created a scaffold with a ‘new’ action, which I replaced with ‘new_record’ and ‘new_upload’, becasue there are two ways to attach audio to this model.

Going to /audioclips/new_record doesn’t work because it takes ‘new_record’ as if it was an id. Instead of changing this, I was trying to just create ‘/record_clip’ and ‘/upload_clip’ paths.

So in my routes.db I have:

map.record_clip '/record_clip', :controller => 'audioclips', :action => 'new_record'
map.upload_clip '/upload_clip', :controller => 'audioclips', :action => 'new_upload'

When I navigate to /record_clip, I get

ActionController::MethodNotAllowed
Only get, head, post, put, and delete requests are allowed.

I’m not extremely familiar with the inner-workings of routing yet. What is the problem here? (If it helps, I have these two statements above map.resources => :audioclips

  • 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-14T16:48:24+00:00Added an answer on May 14, 2026 at 4:48 pm

    Yes, your two routes are conflicting with your mapped resource (the map.resources => :audioclips bit).

    If you want to continue using resources, I suggest you change that line to:

    map.resources => :audioclips,
                     :new => { 
                        :new_record_clip => :post,
                        :new_upload_clip => :post }
    

    If you want some more information, the Rails guide is incredibly helpful on this topic:

    http://guides.rubyonrails.org/routing.html#adding-more-restful-actions

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

Sidebar

Related Questions

I have a Rails Model called Events which has as field/attribute called :description. I
I have the old legacy table called DXFTACCTS, and I created Rails model Account.
I have a rails model called UserScore which has user_id and computed_date. It has
I have a Rails model called Person which has database table columns for first_name
I have a Ruby on Rails model that has a column called expiration_date .
I'm working with Rails 3.2.2. And I have a devise model called user. In
I have a model in Rails called Recipe. The recipe model contains ingredients. Each
I have a YML file containing fixtures for a Rails model (Comment) which looks
In a rails application, I have a number of attributes for a model called
I have a model called Action. It looks like this: class Action < ActiveRecord::Base

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.