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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T20:31:21+00:00 2026-06-17T20:31:21+00:00

I’m pretty new to rails and I’ve created a method in posts_controller.rb that contains

  • 0

I’m pretty new to rails and I’ve created a method in
posts_controller.rb that contains the following

def update_feeds 
    Post.get_feeds -- works via console 
    @rss_feedsTab = "/admin/posts"
    redirect_to @rss_feedsTab, :notice => 'Feeds Updated successfully'
end 

and trying to make it fire in my view with:

<%= link_to 'Update Feeds', :controller => "posts", :action => "update_feeds", :method=>:post %>

and I get a routing error:

No route matches {:action=>"update_feeds", :method=>:post, :controller=>"admin/posts"}

I’m really not grasping how this whole routing works at all, any help would be appreciated 🙂

CONTROLLER=posts rake routes:

admin_post GET    /admin/posts/:id(.:format)      admin/posts#show
            PUT    /admin/posts/:id(.:format)      admin/posts#update
            DELETE /admin/posts/:id(.:format)      admin/posts#destroy
            GET    /admin/posts(.:format)          admin/posts#index {:collection=>{:update_feeds=>:post}}
            POST   /admin/posts(.:format)          admin/posts#create {:collection=>{:update_feeds=>:post}}
            GET    /admin/posts/new(.:format)      admin/posts#new {:collection=>{:update_feeds=>:post}}
            GET    /admin/posts/:id/edit(.:format) admin/posts#edit {:collection=>{:update_feeds=>:post}}
            GET    /admin/posts/:id(.:format)      admin/posts#show {:collection=>{:update_feeds=>:post}}
            PUT    /admin/posts/:id(.:format)      admin/posts#update {:collection=>{:update_feeds=>:post}}
            DELETE /admin/posts/:id(.:format)      admin/posts#destroy {:collection=>{:update_feeds=>:post}}

routes.rb

namespace :admin do

   resources :users,:videos,:posts,:links,:rss_feeds

   resources :posts, :collection => {:update_feeds => :post}

end
  • 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-06-17T20:31:22+00:00Added an answer on June 17, 2026 at 8:31 pm

    I think you would do well to pay attention to two things here:

    1) The method’s name in the controller must match the view’s name. That is one of the conventions of Rails. For instance, an index method in posts_controller.rb (posts#index for short) will automatically look for a view called posts/index.html.erb.

    2) Also, your routes establish which names you should use for your controller methods (also called controller actions). Those names are based upon the HTTP verbs (index, new, create, edit, update, show, destroy). So, controller actions are also not named randomly. I would suggest that you work from one of the existing actions listed in your routes.

    Rails does allow you to easily create your own actions with the names you want, but you should probably play by the conventions first, and only then try to begin customizing things.

    That particular error message you’re getting means there is no route associated with the controller action you just created. As I said, creating controller actions involves creating associated views and routes — and that’s why I discourage you to do so at this point. Start from the routes, look at which ones you have and go from there.

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

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to create an if statement in PHP that prevents a single post
Let's say I'm outputting a post title and in our database, it's Hello Y&#8217;all
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I've got a string that has curly quotes in it. I'd like to replace
I have a small JavaScript validation script that validates inputs based on Regex. I
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and

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.