similar to: New View Example With Child Object?

Displaying 20 results from an estimated 3000 matches similar to: "New View Example With Child Object?"

2007 May 07
6
meta data update
The switch to the new metadata system is almost complete. All plugins in the fdo repo except plane and ini have been converted. I'll probably go ahead and convert those plugins as well sometime soon unless the original authors of those plugins tells me not to. The horrible gconf-dump plugin has been removed and replaced by a simple xslt stylesheet. gconf schemas are now generated from the xml
2006 May 10
2
ruby bindings odds and ends
In the Ruby bindings, set_X and get_X are renamed to remove the get/set, so MSet::get_matches_estimated() becomes a read-only property (if I have my terminology right) of the Ruby MSet class called matches_estimated. This matches how a Ruby programmer would expect a class to be designed. I was looking through the getters and setters list. I wonder if a few entries shouldn't be there, (the
2006 Feb 14
8
Assigning has_many child in parent creation question
If I have... class Parent has_many :children end class Child belongs_to :parent end ...then... * Assigning a _new_ child during parent''s creation saves the child record with the parent''s id. child = Child.new Parent.create(:children => [child]) # Results in child being associated with parent * Assigning an existing child after a parent''s creation
2006 Jan 10
8
Noob: Child records not saved
Hi all, happily coding along, but it seems a belongs_to record is not saved. # Create some stuff def create_project @contact = Contact.new @project = Project.new(@params[''project'']) @project_contact = ProjectContact.new(@params[''collect'']) @project.project_contact = @project_contact contact =
2006 Mar 13
2
relationship woes
I have two tables: class PgmUpdate < ActiveRecord::Base has_many :pgm_visits, :foreign_key => ''pgm_update_fk'' ... and class PgmVisit < ActiveRecord::Base belongs_to :pgm_update, :foreign_key => ''pgm_update_fk'', :dependent => true ... According to the has_many docs (http://api.rubyonrails.org/classes/
2008 Apr 23
1
Validation dependent on unsaved parent
I''m having trouble with a validation that depends on an attribute of a belongs_to parent. If the child is added to an unsaved parent (parent.children << new child), the has_many collection parent.children includes the unsaved child. However the belongs_to attribute child.parent appears to be nil until the parent has been saved. Without access to the parent attributes, the validation
2008 Apr 28
1
OSX R GUI visual interface tweak (PR#11318)
Full_Name: Ana Nelson Version: R 2.7.0 GUI 1.24 (5102) OS: OSX 10.5.2 Submission from: (NULL) (213.94.201.89) The R GUI close button has a solid circle. Screenshot is here: http://skitch.com/ananelson/kmxj/r-console On OSX this indicates that there are unsaved changes pending. Please see page 201 of the Apple Human Interface Guidelines (version 2008-03-11):
2006 Apr 05
6
Howto add application-wide variables?
I suspect this is something I should know already but I can''t seem to get it right, how can I create application wide variables and have them accessible to all my controllers? I tried creating a plugin and having my controller require a specific method from that plugin to access its variables but that didn''t work, so I am left scratching my head. eg from plugin
2007 May 09
6
more_like_this
Hi, I''m using acts_as_ferret in my rails application and I''d like to use more_like_this to retrieve some ''similar'' item suggestions. I have a class ''items'' which has a status field and I need to retrieve items that only have one of the two possible statuses. Looking at the more_like_this method indicates it supports an :append_to_query
2013 May 09
1
equivalent way to iterate through a hash
If I have something like this in my node file: daemontools_service::setup { ''carbon-cache'': service_name => ''carbon-cache'', .... extra_envs => { "GRAPHITE_STORAGE_DIR" => "/mnt/statsd-data/graphite-storage" "SOMETHING_ELSE" =>
2013 Feb 06
0
inverse_of breaks for unsaved child associations during save of parent
I''m willing to write a patch for this issue: https://github.com/rails/rails/issues/8893 But want to confirm that the new behavior makes sense before I make the effort. Essentially if you have an unsaved parent and child, and the parent''s association to the child has an inverse_of declared on it. When the parent gets saved, it updates the foreign key on the child, and this
2008 Jun 07
5
Can create record but can not update it => has_many through
Hi All, I have a problem using has_many through association. I can create a product without problem, but when i edit it, i got this NoMethodError: undefined method `reciters='' for #<Product:0xb71a77e8> Did i miss something to code? I provided the codes below. Please help Thanks, Dida product_controller.rb ====================== def create @product =
2013 Jun 13
0
[LLVMdev] RFC - Profile Guided Optimization in LLVM
On 2013-06-12 18:15 , Chandler Carruth wrote: > > On Wed, Jun 12, 2013 at 3:10 PM, Jakob Stoklund Olesen > <stoklund at 2pi.dk <mailto:stoklund at 2pi.dk>> wrote: > > It predates the block frequency interface. It just needs to be > hooked up, patches welcome. It would also be nice to remove the > floating point computations from the spill placement
2006 May 20
10
HOW TO create a new record and its associated objects within the SAME PAGE
hi, can''t find any good tutorial or advice to deal with the creation of a new record and it''s associated objects within the same page. do i have to use ajax just to add custom form fields that will be handled by the controller for associated objects creation.? do i have to use ajax to add associated objects to the unsaved but allready in session parent object? what''s
2005 May 19
5
[OT] Sqlite2 question
So, under Sqlite2, if I want to update a database''s schema, I have to dump the DB, modify the table''s structure, then go and modify EVERY insert statement. The insert statements look like (from memory): INSERT INTO my_table VALUES (''some_id'', ''some_val'', '''', '''', '''', ''some_other
2013 Jun 12
3
[LLVMdev] RFC - Profile Guided Optimization in LLVM
On Wed, Jun 12, 2013 at 3:10 PM, Jakob Stoklund Olesen <stoklund at 2pi.dk>wrote: > It predates the block frequency interface. It just needs to be hooked up, > patches welcome. It would also be nice to remove the floating point > computations from the spill placement code. Cool, if Diego doesn't beat me to it, I may send you a patch as that seems easy and obviously
2005 Mar 03
12
bug in postgresql ''now'' time handling??
line 212 of postgresql_adapter.rb is return Time.now.to_s if value =~ /^\(''now''::text\)::(date|timestamp)/ i don''t think this will work. in postgresql the field ''now'' is pinned to the SAME TIME for the duration of a transaction. eg. if you do begin transaction; insert into t values(42, ''now''); # sleep one minute
2006 Jul 06
9
Where to put code - controller or model
I have a Rails app that is a directory indexer. It passes the desired directory path in the url. There is a user table, and a permissions table (which contains the volumes each user has permission to see). There is also a volume table, which contains the available volumes, and a path table, which contains the paths to every file available on the machine. [There are other tables, but these
2006 Jul 09
17
Has many / belongs to error with mysql
Hi, I''ve got stuck with a problem on my rails app - I''ve created a database for quotes and bookings, with a futher table "eventdetails" (details of a quote or booking) linked one-one for both tables using a polymorphic assciation. This all works, but I am now trying to link a quote to a number of bookings with a has_many and belongs_to (the foreign key is in the
2006 Mar 28
2
R crashes during 'eigen'
Hi all, Hi, When I want to compute the eigenvalues & eigenvectors of a specific matrix, R crashes (i.e. it stops responding to any input). I've tried it with different versions of R (2.1.1, 2.2.0, 2.2.1) - all with crashing as result. What I did before the crash was: M <- as.matrix(read.table("thematrix",header=T)) eigen(M) If, instead of eigen(M), I use eigen(M,