Displaying 20 results from an estimated 22 matches for "case_manag".
Did you mean:
case_manager
2006 Feb 06
3
linked table confusion
placement.rb
has_one :client
has_one :case_manager
client.rb
belongs_to :case_manager
has_many :placements
case_manager.rb
has_many :clients
has_many :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...
2006 Jan 25
2
select list generated from table
Have 2 tables - clients & case_managers
class Client < ActiveRecord::Base
has_one :case_manager
end
app/views/clients/_form.html contains line...
<p><% collection_select("client", "case_manager_id", \
case_manager.find_all, "name", "id") %></p>
and this line generates...
2006 Jan 30
5
Lookup from related tables
I have been working on this for 3 days and haven''t been able to solve
it.
I have 2 tables...
clients
belongs_to: case_managers
case_managers
has_many: clients
When entering new clients, I need to have some type of select box that
allows me to pick the case_manager (by name) so that the ''id'' field from
the case_manager table is inserted into clients.case_manager_id field.
I cannot figure out how to d...
2006 Jan 28
1
finishing a lookup value
I have a form...2 tables and using auto_complete
table clients
id
case_manager_id
foreign key case_manager_id to case_manager(id)
table case_manager
id
name
my app/views/clients/_form.rhtml includes which works (finally!)
<%= text_area_auto_complete_for :case_manager :name %>
and now in clients_controller.rb
def create
@client = Client.new(params[:client])
I ne...
2006 Jan 30
3
general questions
...am lacking information - some basic things - especially debugging.
The following are stupid newbie questions and any portion of them
answered would be great.
1. If I am viewing a page from app/views/clients/ and on this page, I
want to put a ''link_to'' directive to say app/views/case_managers...
how do I do this? For example,
<% link_to client.case_manager_wholename, :action => case_managers/show
%>
takes me to /clients/case_managers/show.rhtml which is an error instead
of /case_managers/show.rhtml which is where I wanted to go,.
2. rdoc... I tried the other day...I some...
2006 Jan 26
0
selecting from dynamic pop-up list populated by a table
I''ll try again...
I am looking at this page...HowToUseFormOptionHelpers
http://wiki.rubyonrails.org/rails/pages/HowtoUseFormOptionHelpers
perhaps I should be using Ajax for this...I haven''t looked at Ajax yet.
Have 2 tables - clients & case_managers
I want the data from a column in case_managers to be the select list on
a screen for adding/editing clients as I am pretty sure that I have the
necessary things set up for relationship between the two tables.
class Client < ActiveRecord::Base
has_one :case_manager
end
app/views/clients/_...
2006 Jan 28
1
referencing a table
I am trying to use auto_complete_for to reference a different table.
in my clients_controller.rb file
auto_complete_for :case_manager :case_manager.name
^^^^^^^^^^^^
this is not the clients table
my models/clients.rb has:
has_one: case_manager
The above ''auto_complete_for'' line in clients_controller.rb generates
the following error when I a...
2006 Apr 15
6
view code regular expression
I''m lost on regular expressions to begin with...
I''m trying to fix a value to one of 4 radio buttons as there will be
value of either 1,2,3 or 4 in @roles_users...
<TD><input type="radio" id="roles"
name="case_managers[case_manager_name]"
value="Case Manager Admin"
<% if =~ @roles_users /1/ checked = "checked" %> /></TD>
<TD><input type="radio" id="roles"
name="case_managers[case_manager_name]"
value="Case Man...
2006 Mar 25
1
foreign keys on migration
...imary key restratints for PostgreSQL
execute ''ALTER TABLE ONLY referral_notes ADD CONSTRAINT
referral_notes_pkey PRIMARY KEY (id)''
execute ''ALTER TABLE ONLY placements ADD CONSTRAINT placements_pkey
PRIMARY KEY (id)''
execute ''ALTER TABLE ONLY case_managers ADD CONSTRAINT
case_managers_pkey PRIMARY KEY (id)''
execute ''ALTER TABLE ONLY facilities ADD CONSTRAINT facilities_pkey
PRIMARY KEY (id)''
execute ''ALTER TABLE ONLY clients ADD CONSTRAINT clients_pkey
PRIMARY KEY (id)''
execute ''ALT...
2006 Jan 29
1
returned values and consequent usage
I think I can have finally reduced my problem to something somebody can
help me with.
I am using auto_complete...
specifically the form command is...
<%= text_area_auto_complete_for :case_manager :name %>
I need to use the value derived here in my controller...
If I use...
cm = CaseManager.find(:first, :conditions => "name = ''Thomas E Dewey''")
it works. I need to substitute the value derived from auto_complete
above for Thomas E Dewey...
cm = CaseMan...
2006 Feb 14
8
routing failures
...''list''
which worked once I figured out apache...
Anyway, now that I have done that, all attempts to access stuff inside
the public directory fails (stylesheets, javascripts etc.) with this in
the logs...
ActionController::RoutingError (Recognition failed for
"/stylesheets/case_manager.css"):
(I don''t think I need to keep including more of these or the traces).
I would like to have it do the default route but if it breaks
everything, that doesn''t make much sense...where am I going wrong?
Thanks
Craig
2006 Apr 02
5
foreign keys and migrations
Hi:
I''m looking to get a point clarified which i''m sure is obvious to
everyone else but I haven''t been able to find the answer to. i''ve
tried searching through the forums and the api pages and haven''t found
anything.
Is there a way with migrations to set up foregin key relationships?
(beyond putting in the relevant foregin_id attributes)
Is
2008 Mar 23
1
radio buttons - how to identify record using value?
I''m making a simple questionnaire app using RoR. I''ve got a model for
Questions, a model for Answers, and a third model, Qa, for matching each
question to five possible answers through foreign keys. So, each qa has
a question and five answers , a1-a5, through belongs_to and a
:foreign_key, and then a selected_answer field for specifying which
answer was selected by the user. The
2006 Feb 13
8
postgres and rake
...ronment (first_time)
** Execute environment
** Execute db_structure_dump
** Invoke purge_test_database (first_time)
** Invoke environment
** Execute purge_test_database
** Execute clone_structure_to_test
psql:db/development_structure.sql:28: NOTICE: CREATE TABLE will create
implicit sequence "case_managers_id_seq" for "serial" column
"case_managers.id"
psql:db/development_structure.sql:57: NOTICE: CREATE TABLE will create
implicit sequence "placements_id_seq" for "serial" column
"placements.id"
psql:db/development_structure.sql:70: NOTICE: C...
2006 Jan 25
17
Lookup pattern in Ruby
Hi folks,
I''m curious how a lookup with a large group of values would be handled
in Rails.
For example, I have a (contrived) AnimalType filtering a list of many
Animals--more than can be presented comfortably in a dropdown box.
Therefore I need to either redirect to another screen to select an
animal (returning after the selection is made), or show a dialog--modal
or otherwise--to
2006 Feb 21
8
Validations continued
I simply can''t figure this out. I have been reading and re-reading Agile
book and wiki.rubyonrails.org - all sorts of validation methods and
still, it doesn''t work.
Controller code
def create
@client = Client.new(params[:client])
if @client.save!
flash[:notice] = ''Client was successfully created.''
redirect_to :action =>
2006 Jan 25
7
join fields for list views
I am sitting with the Agile book on my desk and scratching my head at
the discussion on aggregation - perhaps that isn''t what I need.
I have a db called clients.
fields include - first_name middle_initial last_name
I want to combine them all into one name element in a list view. I can
add/edit the fields separately but in the list view, I only want the one
combo field.
Is there a
2006 Feb 19
8
building multiple find conditions
...een ? and ?",
params[:beg_discharge_date], params[:end_discharge_date] ]
end
-> @vw_string = [@vw_string1, @vw_string2, @vw_string3]
@placement_pages, @placements = paginate(
:placements,
:conditions => @vw_string,
:include => [:client, :case_manager, :facility],
:order_by => ''referral_date'',
:per_page => 14)
The above setup gives me an error ''undefined method ''%" for []:Array
Same thing if I set...
@vw_string = @vw_string1, @vw_string2, @vw_string3
and if I do it like this......
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 23
3
rake error
...e
(in /home/craig/ruby-db/th-db)
** Invoke appdoc (first_time)
** Invoke doc/app/index.html (first_time)
** Invoke doc/README_FOR_APP (first_time, not_needed)
** Invoke app/models/client.rb (first_time, not_needed)
** Invoke app/models/placement-safe.rb (first_time, not_needed)
** Invoke app/models/case_manager.rb (first_time, not_needed)
** Invoke app/models/client-bak.rb (first_time, not_needed)
** Invoke app/models/facility.rb (first_time, not_needed)
** Invoke app/models/user.rb (first_time, not_needed)
** Invoke app/models/referral_note.rb (first_time, not_needed)
** Invoke app/models/role.rb (firs...