search for: resultscontrol

Displaying 1 result from an estimated 1 matches for "resultscontrol".

2006 Feb 11
3
Creating new object using params posted from form
.... It''s model file is just: class Search attr_accessor :major_build_id, :minor_build_id, :environment_id, :system_id end The controller creates an empty instance variable the first time the page is called, else it tries to populate it with the values of params from the form. class ResultsController < ApplicationController def index list render :action => ''list'' end def list if request.get? @search = Search.new else @search = Search.new(params[:search]) end end end The form on the results/index page which populates the for...