Displaying 4 results from an estimated 4 matches for "applicant_id".
2010 Dec 02
0
Thinking Sphinx sorting problem
...troller, I have a search action:
----------------------------------------------------------
def search
@searched = params[:search]
@sort = params[:sort_by].to_i
@filter = params[:filter_by].to_i
application_ids = Application.search_for_ids(@searched,
:select => "id, applicant_id",
:group_by => ''applicant_id'', :group_function => :attr,
:with => Application.filter_for_search(@filter, @season),
:sort_mode => :extended,
:order => Application::Search::SortBy::SPHINX[@sort], # this gives
me sql string to sort by...
2005 Aug 04
0
Finding rows in table a with zero related rows in table b, part ii
...has_many :interviewers,
:order => "lname, fname"
has_many :applicants
has_many :unassigned_applicants,
:class_name => "Applicant",
:finder_sql => "select a.* from applicants a left join
applicants_interviewers ai " +
"on a.id = ai.applicant_id where ai.applicant_id is null"
end
Running that SQL through the mysql command-line tool returns exactly the
data I''m looking for. However, in my district_controller.rb file, I''ve
got this method:
def unassigned_list
@dist = District.find( params[:dist_id] )
@applican...
2006 Jul 02
5
Question about setting field values for a belongs_to model
...ml file, app/views/applicant/edit.rhtml
4. Applicant and Skill models
create table if not exists applicants (
id int not null auto_increment,
name varchar(20) not null,
primary key(id),
unique index uniq_index(id)
);
create table if not exists skills (
id int not null auto_increment,
applicant_id int not null,
description varchar(30) not null,
primary key(id),
unique index uniq_index(id)
);
class ApplicantController < ApplicationController
:
: methods generated by scaffold
:
def update
@applicant = Applicant.find(params[:id])
@applicant.attributes=params[:applicant]...
2006 Mar 08
19
Creating multiple rows with one form
Hello. I''ve been trying this out for the past two days and I can''t seem to
get it. I''m going to have a page where you can upload x amount of images at
once. Lets say 10 images need to be uploaded, all with a caption.
I''d like to have a browse button to choose the file, then the caption. Now,
if I put 10 of them in one form, fill them all out and submit, I get