search for: program_id

Displaying 6 results from an estimated 6 matches for "program_id".

2006 Feb 02
4
Doubts on validation
...t;/b></td> <td><%= text_field "student", "fname", "size" => 40, "maxlength" => 40 %></td> </tr> <tr> <td><b>Program: </b></td> <td><select id="student_program_id" name="student[program_id]"> <%= options_from_collection_for_select @programs, "id", "prg_name", @student.program_id %> </select> </td> </tr> Model ******* class Student < ActiveRecord::Base belongs_to...
2006 Feb 02
0
Validation fails with select option list
...me" name="student[mname]" size="20" value="" type="text"> <input id="student_lname" name="student[lname]" size="20" value="" type="text"> Program:</dt><dd><select id="student_program_id" name="student[program_id]"> <%= options_from_collection_for_select @programs, "id", "prg_name", @student.program_id %> </select> I am not able to use validates_presence_of in the model whenever I am including this options_from_collection_for_sel...
2009 Mar 18
0
search across models
...nd has containerformat_id as one column 3)programs: have how many video and audio streams are there in each program and has transportstream_id as one column 4)streams : which will have the video and audio stream parametes and it has all other table ids like: transportstream_id containerformat_id program_id and i have association like: containerformats has_many:transportstreams transportstreams has_many:programs programs has_many:streams streams belongs_to :all above tables I have cretaed a search controller to implement the search: now here my sample querie i want to implement in my search control...
2012 Mar 06
0
Devise/Cancan Signout User On Controller Action
...ond_to do |format| format.html # index.html.erb format.csv { render :csv => @transactions} end AND Account Controller class AccountsController < ApplicationController load_and_authorize_resource helper_method :sort_column, :sort_direction def index @accounts = Account.search(params[:program_id] respond_to do |format| format.html # index.html.erb format.json { render :json => @accounts} end def our_miles_balance a = Account.find_by_account_number(params[:account_number]) @miles = Account.our_miles_balance(a.id) if ?a!=nil respond_to do |format| format.json {...
2006 Jul 15
3
How bad is it to have 7 joins in my find_by_sql?
...sers.id LEFT OUTER JOIN airports AS origins ON activities.origin_id = origins.id LEFT OUTER JOIN airports AS destinations ON activities.destination_id = destinations.id LEFT OUTER JOIN airlines ON activities.airline_id = airlines.id LEFT OUTER JOIN programs ON accounts.program_id = programs.id LEFT OUTER JOIN membership_levels ON accounts.membership_level_id = membership_levels.id WHERE accounts.user_id = #{@session[:user].id} ORDER BY activities.date DESC LIMIT #{items_per_feed}" @activities = Activity.find_by_sql(sql_query) end Now, here...
2006 Oct 13
3
Validation errors in has_one/belongs_to relationships.
I have two objects, QuoteInput and Insured. QuoteInput has one Insured and Insured belongs to QuoteInput. I don''t understand what I''m seeing. I assign an Insured to a QuoteInput. The Insured object has invalid data. I call save! on the quote input. QuoteInput has no validations. I expect two things to happen - 1) an exception should be thrown, indicating that there was a