similar to: second table column data lift

Displaying 20 results from an estimated 7000 matches similar to: "second table column data lift"

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 <% @placement.case_manager.wholename %>
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 error... undefined local variable or method
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
2006 Mar 25
1
foreign keys on migration
I have reached a development plateau and now want to integrate some of the rails niceties that I passed over to get the system online. I am fooling with migrations. I am using postgresql. I put in my migration script (at the end of the ''up'' method, the following raw sql code... # set up primary key restratints for PostgreSQL execute ''ALTER TABLE ONLY
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
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 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
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 need to add a line to
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
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 Feb 06
2
basic usage confusion
I am confused. Looking at ''list'' from scaffold, I see a record and click the ''show'' button. I put in a ''link'' at the bottom of ''show.rhtml'' to my ''view'' rfn2.rhtml - action = ''rfn2'', :id = @placement I click this link and get error... log/development.log Processing
2006 Jan 30
3
general questions
Agile book lacks some basic information, perhaps I need to learn ruby as I 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
2006 Mar 14
2
autocomplete using other models
I''ve asked this in various ways but I can''t seem to get much traction - my guess is because not many people are doing this. I am working in a controller/views called placements. Placements belongs_to :client I have a clients model/table - clients has_many :placements in placements/find...this works fine... <%= text_field_with_auto_complete :placement, :clwholename, {} %>
2006 Feb 13
8
postgres and rake
am in a bit of a quandry... I have asked postgresql-users list and haven''t gotten anything to work with... > > How do I change the owner of a schema? > > > > ALTER SCHEMA "public" OWNER to "some_user"; #? > > http://www.postgresql.org/docs/current/interactive/sql-alterschema.html > > The docs explain this very situation. HTML
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 23
3
rake error
I installed at least one gem since I thought I actually once was able to run ''rake appdoc'' command since there is an api for my models and the ez_where plugin that I installed earlier. I wanted to see the api for pdf-writer which is the gem that I installed most recently. (no, I haven''t given up the issue of ''looping'' that Kevin and some others replied
2006 Feb 07
0
trying to order a list view
I''m trying to order 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)
2006 Feb 14
8
routing failures
probably something really simple but I don''t understand. Shifting to Apache to w/ fastcgi (definitely feels faster than webrick) Anyway, I set the default route in routes.rb to be map.connect '''', :controller => "placements", :action => ''list'' which worked once I figured out apache... Anyway, now that I have done that, all attempts
2006 Feb 07
7
select list error - following Agile guide
I would swear that I am tracking exactly the method used in Agile book... TypeError in Placements#edit Showing app/views/placements/_form.rhtml where line #33 raised: wrong argument type String (expected Module) Extracted source (around line #33): 30: <tr> 31: <td><label for "type">Type</label></br><%= 32: options = [["Select
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.