Displaying 5 results from an estimated 5 matches for "placement_id".
2006 Feb 06
3
linked table confusion
...placements
I am trying to create a view file for placements.
I can pull columns from clients table in this view by using...
<%= @placement.client.wholename %>
but if I use
<% @placement.case_manager.wholename %>
I get error...
RuntimeError: ERROR C42703 Mcolumn case_managers.placement_id does
not exist Fparse_func.c L1359 Runknown_attribute: SELECT * FROM
case_managers WHERE (case_managers.placement_id = 4) LIMIT 1
which makes sense in that I don''t have a ''placement_id'' column in
case_managers table. But case manager has many placments so I did cr...
2006 Feb 07
11
breaking down a list view
I''m trying to figure out how to change the order of a list view and it''s
obvious to me that I don''t understand what I get from a simple scaffold
to know enough to alter it.
If someone would be so kind to tell me what this means ...
def list
@placment_pages, @placements = paginate :placements, :per_page => 10
end
@placement_pages, # I am guessing that this
2006 Feb 08
0
foreign table references...a new twist
...completely stumped.
table referral_notes
belongs_to: placement
table placements
has_many: referral_notes
def list_rfn
@placement = Placement.find(:all) # possibly unnecessary
@referral_note = ReferralNote.find(:all,
:include => [:placement],
:conditions => ["placement_id = ?", params[:placement_id] ])
@referral_note_pages, @referral_notes = paginate(
:referral_notes,
:include => [:placement],
:conditions => ["placement_id = ?", params[:placement_id] ],
:per_page => 14)
end
list view (possible multiple records)....
2007 Oct 25
1
find - group - postgres
...y_id = 1 AND client_id IS NOT NULL) GROUP BY client_id
Which I don''t understand.
create_table "client_slots_dailies", :force => true do |t|
t.column "name", :string, :limit => 7
t.column "facility_id", :integer
t.column "placement_id", :integer
t.column "client_id", :integer
t.column "created_at", :datetime
end
I can do ClientSlotsDaily.count etc. but not find as configured.
I don''t want to keep hitting the DB and the group function made sense
until I tried to use it.
Suggesti...
2006 Mar 25
1
foreign keys on migration
...facility_id) REFERENCES facilities(id)''
execute ''ALTER TABLE ONLY placements ADD CONSTRAINT
fk_cp_case_manager FOREIGN KEY (case_manager_id) REFERENCES
case_managers(id)''
execute ''ALTER TABLE ONLY referral_notes ADD CONSTRAINT
fk_cp_placement FOREIGN KEY (placement_id) REFERENCES placements(id)''
The primary key constraints are indeed all created but the foreign keys
constraints are not created.
Anyone care to toss me a bone here?
Craig