search for: placements_controller

Displaying 8 results from an estimated 8 matches for "placements_controller".

2006 Feb 23
3
rake error
...p/models/referral_note.rb (first_time, not_needed) ** Invoke app/models/role.rb (first_time, not_needed) ** Invoke app/models/login.rb (first_time, not_needed) ** Invoke app/models/placement.rb (first_time, not_needed) ** Invoke app/models/right.rb (first_time, not_needed) ** Invoke app/controllers/placements_controller.rb (first_time, not_needed) ** Invoke app/controllers/clients_controller.rb (first_time, not_needed) ** Invoke app/controllers/clients_controller-bak.rb (first_time, not_needed) ** Invoke app/controllers/placements_controller-bak.rb (first_time, not_needed) ** Invoke app/controllers/referral_notes_...
2006 Feb 08
2
compound conditions in find
can''t seem to find the right syntax for this... /script/../config/../app/controllers/placements_controller.rb:155: syntax error :conditions => [["placements.client_id = ?", params[:client_id] ] and "placements.discharge_date IS NOT NULL" ], this part works... :conditions => ["placements.client_id = ?", params[:client_id] ] this is what I want to add... &qu...
2006 Feb 06
2
basic usage confusion
...d `placement'' for #<#<Class:0xb78874a8>:0xb7887124>) on line #11 of app/views/placements/rfn2.rhtml: 8: <%= debug params %> 9: <%= params.inspect %> 10: 11: <%= placement.referral_date %> which of course is the line in rfn2.rhtml that is causing the problem. placements_controller.rb has... def rfn2 @placement = Placement.find(params[:id]) end just like def edit and if I click on the ''edit'' link...no problem...I get the edit.rhtml with ''id'' = "4" Obviously, rfn2 knows I am wanting ''id'' = ''4&...
2006 Mar 10
6
boolean select problem
I want to use select form elements to choose between boolean options. How can I have it default to true and still display the persisted value (either true or false) when editing an existing object? I guess booleans default to false by default so its not obvious how to recognize when it''s a real ''false'' that the user set or default false because the value was null.
2006 Mar 14
2
autocomplete using other models
...clients has_many :placements in placements/find...this works fine... <%= text_field_with_auto_complete :placement, :clwholename, {} %> if I put the same code into placements/new or placements/edit, I get a No method ''clwholename'' error The method is defined at the top of placements_controller.rb ... def auto_complete_for_placement_clwholename auto_complete_responder_for_clients params[:placement][:clwholename] end I have taken the entire code from the view file placements/find.rhtml and pasted it into placements/new and still get the same error. The only difference of any sign...
2006 Feb 08
7
DRY methodology
because I am a grasshopper... Now that I can sort my ''list''...is there a logical way of not repeating myself to having essentially the same list view with multiple sorts? i.e. def list_cl # ordered by clients last name @placement_pages, @placements = paginate( :placements, :include => [:client], :order_by =>
2006 Feb 07
0
second table column data lift
have placements, clients and case_managers tables with relationships Trying to create new placement record...case_manager_id field exists in clients table. I need the value from related clients record in placements table in placements_controller.rb def create @placement = Placment.new(params[:placement]) case_manager_id = Client.case_manager_id # this doesn''t work if @placement.save flash[:notice] = ''Placement was successfully created'' redirect_to :action => ''list'' else...
2006 Feb 07
0
trying to order a list view
...der a list view which contains elements from related tables and wanting to use columns from the related tables to create the order. The error... NoMethodError in Placements#list You have a nil object when you didn''t expect it! The error occured while evaluating nil.facility The code... placements_controller.rb def list @client = Client.find(:all) @facility = Facility.find(:all) @placement_pages, @placements = paginate :placements, :order => @placements.facility.name, :per_page => 14 end If I remove the :order => @placements.facility.name I get the listing (unordered) with t...