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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:15:01+00:00 2026-05-23T14:15:01+00:00

First off, I’m using rails 3.0.8 with friendly_id 3.2.1.1. I’d like to be able

  • 0

First off, I’m using rails 3.0.8 with friendly_id 3.2.1.1.

I’d like to be able to view the posts at website.com/:title, so drop the “/posts”.

But I’d also like to have an /admin view. From there, a user should be able to create/edit/destroy posts. I already have a admin.html.erb view with links to various actions.

Right now my routes file look like:

MyApp::Application.routes.draw do
  root :to => 'posts#index'
  resources :posts
  match "/:id" => "posts#show"
  match "/admin" => "posts#admin"
end

This works for website.com/:title, but for website.com/admin I get an error:

Couldn't find Post with ID=admin

…. which makes sense. But I’m not sure how to solve this problem.

  • 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-23T14:15:01+00:00Added an answer on May 23, 2026 at 2:15 pm

    The rules are run through top to bottom. So put your admin rule on top of the resource definition.

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

Sidebar

Related Questions

First off: I do realize that using models in a view is against the
First off, I am new to using Facebook's Graph interface but I've read the
First off: Everything works , but I would like to fine tune this a
First off, I did look on google and stackoverflow, but nothing seem to really
first off this is a class assignment so i would appreciate help but just
First off all, i'm on OSX 10.7.3 using MonoDevelop 2.8.8.4 with MonoDroid 4.0.6 and
First off, I'd love to post some real code for this question, but I
First off, I am somewhat familiar with Windows Forms but new to WPF. I
First off, my problem is quite similar to this one . I would like
First off, I'm using Access 2000 and DAO. I have code that executes a

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.