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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T07:51:02+00:00 2026-06-01T07:51:02+00:00

I am doing homework but I have problem with non-RestFul routes. My spec is:

  • 0

I am doing homework but I have problem with non-RestFul routes.
My spec is:

require 'spec_helper'

describe MoviesController do
  describe 'searching TMDb' do
    before :each do
      @fake_results = [mock('Movie'), mock('Movie')]
    end
    it 'should call the model method that performs TMDb search' do
      Movie.should_receive(:find_in_tmdb).with('Star Wars').
        and_return(@fake_results)
      get :search_similar_movies, { :search_terms => 'Star Wars' }
    end
  end
end

In config/routes.rb I have:

resources :movies
  'movies/search_similar_movies/:search_terms'

But when I run autotest it gives me error that begins with:

/usr/local/lib/ruby/gems/1.9.1/gems/actionpack-3.1.0/lib/action_dispatch/routing/mapper.rb:181:in `default_controller_and_action': missing :action (ArgumentError)

It’s obvious that something is wrong is config/routes.rb. How to solve this?

  • 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-01T07:51:03+00:00Added an answer on June 1, 2026 at 7:51 am

    Your route should be something like

    resources :movies do
        get 'search_similar_movies', :on => :collection
    end
    

    or

    match 'movies/search_similar_movies/:search_terms' => 'movies#search_similar_movies', :via => :get

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

Sidebar

Related Questions

This is a homework problem that I have. I have been doing some research
Doing homework with signals and fork and have a problem with the signal. I've
well I'm doing this homework but I'm still not viewing the fault... When I
I'm doing some homework and while I have some experience with SML, Haskell has
Im doing a homework problem for computer architecture and im stumped on using a
Upon doing my homework, I stumbled across a problem concerning Python and image manipulation.
I'm doing my homework on java I/O data, the problem is i'm not allowed
So I am doing homework and I am stuck on one spot. I have
I'm new to c++ and got a problem when doing homework (sudoku). Instruction said:
I hate that I have to ask a homework question on here, but I

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.