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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T23:25:59+00:00 2026-06-09T23:25:59+00:00

I have an interesting situation. I am testing the following simple create action: #

  • 0

I have an interesting situation. I am testing the following simple create action:

# will only be accessed via Ajax 
def create
 click = Click.new(params[:click])
 click.save # don't really care whether its success or failure
end

Then I have the following very simple controller spec:

require 'spec_helper'

describe ClicksController, "creating a click" do
  it "should create a click for event" do
    xhr :post, :create, :click => {:event_id => 1}
    # more test to come...
  end
end

Seems trivial, yet I get the following:

Missing template clicks/create

Any tips would be appreciated.

  • 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-09T23:26:01+00:00Added an answer on June 9, 2026 at 11:26 pm

    Add to the controller action:

    render :nothing => true
    

    This one will automatically create the appropriate server’s respone. More here

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

Sidebar

Related Questions

I have faced some interesting situation. I have the following code to populate value
I have an interesting situation that EMF forced me into: abstract class AbstractDog{ ...
I have an interesting question on initialization. I have the following code: public class
I have an interesting situation, well it's probably not that unique at all, but
I have an interesting situation here this time. This more of a conceptual question,
I just found an interesting situation. Suppose you have some SwingWorker (I've made this
We've run into an interesting situation that needs solving, and my searches have turned
I have an interesting situation on my hands, and I'm not quite sure how
I'm working with vector now and I have an interesting situation which I need
I have followed a tutorial to create a simple blog writing application in PHP

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.