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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:29:31+00:00 2026-05-25T19:29:31+00:00

I have a form where I’m creating an interview for a job posting and

  • 0

I have a form where I’m creating an interview for a job posting and one of the fields is a dropdown where I select the candidate (from a list of candidates created on another page) that I plan to interview.

So far I’m able to save the details of the interview as well as the candidates name, but I also want to save the candidates id. I’m not sure how to go about this.

Currently I have

= select("interview", "interviewee_name", Candidate.order('last_name ASC').collect {|c| [c.fullname]})

Somehow I need to find a way to retrieve and save the correct value to candidate_id.

Any help is 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-05-25T19:29:32+00:00Added an answer on May 25, 2026 at 7:29 pm
    = select("interview", "interviewee_name", Candidate.order('last_name ASC').collect{|c| [c.fullname, c.id]})
    

    UPD

    Then (if you really need to store its name) in model add callback:

    class Interview < AR::Base
      before_save :set_candidate_name
      belongs_to :candidate
    
    private
    
      def set_candidate_name
        self.interviewee_name = self.candidate.fullname
      end
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have form, where user selects Airport and then can select one of airport
I have form with one input for email and two submit buttons to subscribe
I have form, where some fields are looks like rows, so I can add/delete
I have: form.input :duration, as: select, collection: {} I need: <option value= data-price=XXX></option> Rails
I have form fields which are checkboxes as below : <input id=abirrules@gmail.com type=checkbox checked=checked
i have form with one selectbox ( collection_select ) for references column. What is
I have Form responsible for logging all neccessary informations from all thread into its
I have form fields where the user enters in: percents: 50.5% money: $144.99 dates:
I' have form that user can select a color. I'm writing that color to
I have a text area in my form which accepts all possible characters from

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.