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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T16:53:52+00:00 2026-06-03T16:53:52+00:00

When I press new on my Jobs form in seeing an error that it

  • 0

When I press new on my Jobs form in seeing an error that it could not find ‘create’ in my JobsController.

Unknown action

The action 'create' could not be found for JobsController

Here’ my controller:

class JobsController < ApplicationController

  private
  def load_clients
        @clients = collection_select :client, :client_id
  end

  def index
    @job = Job.find(:all)

    respond_to do |format|
      format.html # index.html.erb
      format.xml { render :xml => @job }
    end
  end

  def create
    @job = Job.new(params[:job])

    respond_to do |format|
      if @job.save
        format.html { redirect_to @job, notice: 'Job was successfully created.' }
        format.json { render json: @job, status: :created, location: @job }
      else
        format.html { render action: "new" }
        format.json { render json: @job.errors, status: :unprocessable_entity }
      end
    end
  end

  def show
    @job = Job.find(params[:id])

    respond_to do |format|
      format.html # show.html.erb
      format.json { render json: @job }
    end
  end
end

As you can see. It’ clearly there. Why is Rails not seeing it?

  • 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-03T16:53:54+00:00Added an answer on June 3, 2026 at 4:53 pm

    It is because you assign the create method as private.

    Try redefine your controller this way.

    Here’ my controller:

    class JobsController < ApplicationController
    
      def index
        ...
      end
    
      def create
        ...
      end
    
      def show
        ...
      end
    
      private
    
      def load_clients
        @clients = collection_select :client, :client_id
      end
    
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In Visual Studio you can press SHIFT + ALT + C to create new
How can it be that typeface.js doesn't "rewrite" when you press a new href
use=input('what do you wanna do \n1.press w to create a new file\n2.press r to
When I press F5 the project compiles, and the new web page launches. However,
When I yank a whole line and press p , Vim creates a new
When I tried press the CTRL+D+E keys combination, I typed a wrong combination that
When I press CTRL + Space the auto completing not working. It doesn't show
I want to test some features that needs delayed jobs to work, on cucumber.
I have vendors/show view with button Add new item button. When i press Add
Am not sure how to put this, and I couldn't find the answer because

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.