Displaying 18 results from an estimated 18 matches similar to: "RE: has_many_belongs_to_many insert issues [CLOSED]"
2005 Dec 16
0
ArgumentError on create
I have several validations applied to my model:
class Quote < ActiveRecord::Base
has_many :files
validates_presence_of :title, :source, :quote, :message => "Missing
Field Required"
validates_length_of :title, :source, :maximum => 80, :message =>
"Maximum Length 80 characters"
validates_inclusion_of :year, :in=>1911..2006, :message => "Year must be
2007 Oct 07
1
How to store a Mechanize object in the database?
Hi,
I am trying to save a Mechanize object in database (using a Rails Model).
But the save operation throws a TypeError
Considering that "agent" is an instance of a Rails Model and "user" is
defined as a "text" type in the Model.
irb(main):039:0> agent.user = WWW::Mechanize.new
#<WWW::Mechanize:0xb71295f0 @follow_meta_refresh=false, @key=nil,
2006 Mar 28
4
Problem with ActiveRecord, create, save, and Oracle adapter?
Hi all,
Ruby 1.8.4
Rails 1.1
OCI8 0.1.14
I think I''m hitting an issue with ActiveRecord::Base#save and the Oracle
adapter. Line 158 in the schedules_controller.rb file is simply:
158: if @schedule.save
159: flash[:notice] = ''Schedule was successfully created.''
160: redirect_to :action => ''list''
161: else
162: render :action =>
2007 May 31
0
Rails AR/SQLServer Unit Test: [6912] failed (but getting better)
"bitsweat" has given AR/SQLServer some love, but it''s still unhappy...
http://dev.rubyonrails.org/changeset/6912
------------------------------------------------------------------------
r6912 | bitsweat | 2007-05-31 10:15:56 -0700 (Thu, 31 May 2007) | 1 line
Fix an edge case with find with a list of ids, limit, and offset. Closes #8437.
2008 Jun 24
9
ActiveRecord 2.1 Migration support
Hi all,
I am in the process of adding Migration support to the Ingres
ActiveRecord adapter and have run in to a problem. During the call to
create_table the Ingres adapter some how causes ruby to blow the stack
and coredump/segv. I have tracked down the problem down to
"add_column_options!" in
"lib/active_record/connection_adapters/abstract/schema_statements.rb".
2008 Jun 24
9
ActiveRecord 2.1 Migration support
Hi all,
I am in the process of adding Migration support to the Ingres
ActiveRecord adapter and have run in to a problem. During the call to
create_table the Ingres adapter some how causes ruby to blow the stack
and coredump/segv. I have tracked down the problem down to
"add_column_options!" in
"lib/active_record/connection_adapters/abstract/schema_statements.rb".
2008 Jan 16
0
[CruiseControl] RubyOnRails build 8649 failed
The build failed.
CHANGES
-------
Revision 8649 committed by gbuesing on 2008-01-16 20:07:10
Introducing DateTime #utc, #utc? and #utc_offset, for duck-typing compatibility with Time. Closes #10002
M /trunk/activesupport/CHANGELOG
M /trunk/activesupport/lib/active_support/core_ext/date_time/calculations.rb
M /trunk/activesupport/test/core_ext/date_time_ext_test.rb
TEST FAILURES AND
2008 Mar 10
1
is there such an association as has_and_belongs_to_one?
sorry - just had to post my colleague''s non-serious question!
(imagine the plugin;)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email
2010 Aug 10
1
[Fwd: Re: optimization subject to constraints]
-------------- next part --------------
An embedded message was scrubbed...
From: Gildas Mazo <gildas.mazo at curie.fr>
Subject: Re: [R] optimization subject to constraints
Date: Tue, 10 Aug 2010 15:49:19 +0200
Size: 4924
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20100810/78862894/attachment.eml>
2005 Oct 19
0
usb boot (bios pb)
Hello,
Although the subject as been discused several times already I could not
find the answer to my problem in the list archive so here is the last
post (to date) about usb boot problems...
After some time I managed to boot on my usb key perfectly (thanks to
syslinux!)
But I can't boot the brand new key I just got...
I think I'm pretty familiar now with the MBR, boot sector and linux
2010 Apr 28
1
function which saves an image of a dgtMatrix as png
Hi,
I'm getting crazy:
This does work:
library(Matrix)
a1<-b1<-c(1,2)
c1<-rnorm(2)
aDgt<-spMatrix(ncol=3,nrow=3,i=a1,j=b1,x=c1)
png("myImage.png")
image(aDgt)
dev.off()
But this doesn't !!!
f<-function(x){
png("myImage.png")
image(x)
dev.off()
}
f(aDgt)
My image is saved as a text file and contains nothing at all !!!
Thanks in advance,
Gildas Mazo
2010 Aug 09
2
optimization subject to constraints
Dear R users,
I'm looking for tools to perform optimization subject to constraints,
both linear and non-linear. I don't mind which algorithm may be used, my
primary aim is to get something general and easy-to-use to study simples
examples.
Thanks for helping,
Gildas
2012 Mar 06
2
Numerical Inversion of Cumulative Distribution Function
Dear R users,
Given a user-defined cumulative distribution function F, I want to compute F^{-1}(x). How is that possible with R?
Best Regards,
--
Gildas Mazo
PhD student
MISTIS team at INRIA
Grenoble, France
[[alternative HTML version deleted]]
2009 May 06
0
Groups are not recognized any more
Hello,
I've just posted about a group management problem (mail was "Samba group
management understanding")
While waiting for an answer I updated samba to the last version I could
find for centos 4 which is 3.3.4.
Now group membership seems not to work anymore
I export this directory:
drwxrws--- 2 root mt23 4096 mai 6 12:34 test_smb
with this smb.conf extract:
[test]
path
2012 Sep 20
1
optim and "the function should not" advice
Dear R users,
I'm using optim to optimize a pretty complicated function. This function takes the parameter vector "theta" and within its body I use instructions like
sigma<-theta[a:b]; computations with sigma...
out<-c()
for (i in 1:d){
a<-theta[(3*d+i):c]
out[i]<-evaluation of an expression involving 'a' (I use symbolic differentiation)
}
Unfortunately
2010 Jun 04
2
Build Design Matrix with avoiding loops
Dear R users,
I'd like to build a simple design matrix in a efficient way. I naively
wrote the code below.
####
n = 15
k = 3
nbPerGrp = c(5,5,5)
xT <- list()
for (i in 1:k){
xT[[i]] <- rep(0, k)
xT[[i]][i] <- 1
}
X <- matrix(nrow = n, ncol = k) #design matrix
for (i in 1:nbPerGrp[1]){
X[i,] <- xT[[1]]
}
for (i in 1:k-1){
for (j
2010 Jul 22
4
SQL/R
Dear R users,
I want to aggregate data in the following way:
###
X <- data.frame(u = c("T1","T1","T1","T2"), v=c("a","a","b","a"))
X
library(sqldf)
sqlOut <- sqldf("select count(distinct(v)) from X group by u")
sqlOut
###
Now I want to get the same result without using SQL. How can I achieve
that ?
2009 May 06
1
Samba group management understanding
Hello all,
I want to set up a share for a project (enseign)
First thing I did is to create a group for that project (with
smbldap-groupadd) and add project members to that group.
Then I created a test_smb directory on my linux server with the
following access rights:
drwxrwx--- 2 gbayard enseign 4096 avr 29 15:03 /test_smb
Note: the idea is that only group members should be able to