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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T01:52:44+00:00 2026-05-15T01:52:44+00:00

I’m attempting to use the Super Inplace Controls plugin, which has an in_place_select method.

  • 0

I’m attempting to use the Super Inplace Controls plugin, which has an in_place_select method. I have the following models:

class Incident < ActiveRecord::Base
  belongs_to              :incident_status
  validates_existence_of  :incident_status
end

class IncidentStatus < ActiveRecord::Base
  has_many :incidents
end

Right now, IncidentStatus is just an ID and a name (‘Open’ and ‘Closed’). In the show view for Incident, I want to allow a user to click on the current status, and change it using a select menu. So in show.html.erb, I have the following:

<p>
    <b>Status:</b>
    <%= in_place_select :incident, :incident_status_id, :choices => @statuses.map { |e| [e.name, e.id] }, :display_text => @status.name %>
</p>

This follows the example given in the Super Inplace Controls documentation pretty closely, which is:

<%= in_place_select :employee, :manager_id, :choices => Manager.find_all.map { |e| [e.name, e.id] } %>

This actually works fine until I click okay to change the field and submit the POST. I see the Status, then when I click on it brings up a drop down menu with ‘Open’ and ‘Closed’. When I select ‘Closed’ and press okay, the form disappears. The following shows up in the web server console:

Processing IncidentsController#set_incident_incident_status_id (for 127.0.0.1 at 2010-05-14 10:18:43) [POST]
  Parameters: {"commit"=>"OK", "action"=>"set_incident_incident_status_id", "authenticity_token"=>"eahXrzwJwe+h2Byi1ELWXLy0QNmqF2EEXNw+eAfUJwU=", "id"=>"1", "controller"=>"incidents", "incident"=>{"incident_status_id"=>"1"}}

...snip...

ActionController::UnknownAction (No action responded to set_incident_incident_status_id. Actions: admin?, authenticated?, authorized?, create, destroy, edit, index, new, set_incident_incident_status, set_incident_title, show, and update):

So it appears to be looking for a method “set_incident_incident_status_id”. If I define this method in my Incident Controller, it seems to be okay, but I have no idea how to grab the “incident_status_id”=>”1” that was passed in and set it as the foreign key.

Any ideas? Thanks in advance!

  • 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-15T01:52:44+00:00Added an answer on May 15, 2026 at 1:52 am

    Finally got it. I needed to create a method in the Incident Controller. It looks like this:

    def set_incident_incident_status_id
      @incident = @customer.incidents.find(params[:id])
      @incident.incident_status = IncidentStatus.find(params[:incident][:incident_status_id])
      @incident.save
    end
    

    I need to finish it, but that’s the gist.

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

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I used javascript for loading a picture on my website depending on which small

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.