Displaying 20 results from an estimated 3000 matches similar to: "Bug: collection#create misbehaves on validations"
2009 Aug 07
2
create separate plots by factors
Hello,
I am attempting to create several plots based on "site" (~300 total)
and am having trouble with the code. I simply want to create a plot
using the code, plot(year, peak), for the following dataset. I would
like for each site to be plotted on a separate page and the plots
saved in a directory. Would a "foreach" loop work? I tried a "by"
statement, but
2008 Aug 04
1
Emu48 under wine, misbehaves
Hello,
I installed Emu48 (emulator of HP48 and HP49 calculators) on Wine, but
unfortunately it misbehaves.
The "screen" of the emulated calculator shows strange colors (sometimes
yellow on white, sometimes a pale pink color, depends on selected "skin").
Any suggestions to fix the problem? This is wine 1.1.2 on Arch Linux.
Thanks!
--
Renan Birck ~ Santa Maria, RS, Brasil
2007 Nov 29
4
collection.build or collection.create gives "ArgumentError: wrong number of arguments (1 for 0)"
I have a Project that has_many Tasks. Tasks belongs to a Project. When
I try the following:
project = Project.new
project.tasks.build
I get:
>> s = Project.new
=> #<Project:0x25f9e28 @attributes={"name"=>"", "end_at"=>nil,
"updated_at"=>nil, "published_at"=>nil, "user_id"=>nil,
1997 Sep 10
2
R-alpha: model.matrix misbehaves on two-sided formulas
I am using R for a graduate class on linear models that I teach. I
sent the class a sample transcript of explicit construction of the
model matrix and use of the QR decomposition. One of the members of
the class picked up on the fact that the model matrix was not what I
advertised that it should be when a two-sided formula is used. A
one-sided formula works properly. For example,
>
2006 Jul 16
0
Why does belongs_to handle "conflicts" this way?
When you define belongs_to in a model, you can either access
association or association_id. I was wondering how Rails would handle
things if you set each one to be different.
I made two simple models:
class Foo < ActiveRecord::Base; end
class Bar < ActiveRecord::Base
belongs_to :foo
end
Now here''s a script/console session.
>> f = Foo.create
=> #<Foo:0x270ec10
2007 Oct 22
1
self-referential habtm: why are my keys null?
I''m trying to set up a directional self-referential HABTM to represent
an arbitrary semi-hierarchical structure; it works for any data
prepopulated into the db, but when I try to create a new relationship,
I just get NULLs in both key columns (or 0''s if I turn on the no-null
constraint).
Here are the migrations:
class CreateNodes < ActiveRecord::Migration
def self.up
2006 Jan 23
5
validates_uniqueness_of :username, :if => !self.new_record?
Hi all
I want users to register on my page. To register, they only have to
deliver an email and a password. Then a link with an activation token
will be sent to them, and after clicking the link the user sees a page
where he should fill in further details, means: a username.
My model looks like this:
class Member < ActiveRecord::Base
validates_presence_of :username, :if =>
2006 Jun 09
0
Re: Rails Digest, Vol 21, Issue 195
Unsubscribe
Sent from my BlackBerry? wireless handheld
-----Original Message-----
From: rails-request@lists.rubyonrails.org
Date: Fri, 9 Jun 2006 18:24:09
To:rails@lists.rubyonrails.org
Subject: Rails Digest, Vol 21, Issue 195
Send Rails mailing list submissions to
rails@lists.rubyonrails.org
To subscribe or unsubscribe via the World Wide Web, visit
2009 Aug 23
0
Best way of moving some jQuery from a view helper
I have a helper that uses some jQuery code that I would like to move out
of the helper method.
I am trying to move it to application.js but it will probably end up in
a different file.
I have two reasons for wanting to do this.
1) I want to keep all my jQuery code seperate to my HTML code
2) I want to change the append to an appendTo so I can add a highlight
effect, appendTo which is proving
2017 Jul 20
0
Wine release 2.0.2
The Wine maintenance release 2.0.2 is now available.
What's new in this release (see below for details):
- Various bug fixes
The source is available from the following locations:
http://dl.winehq.org/wine/source/2.0/wine-2.0.2.tar.xz
http://mirrors.ibiblio.org/wine/source/2.0/wine-2.0.2.tar.xz
Binary packages for various distributions will be available from:
2007 May 28
2
Rails, respond_to? over anonymous module (extend has_many).
Hello List,
I''m trying to generate examples for some list-helpers I have coded
which use in my projects.
Basically, the Playlist class uses one anonymous module in has_many
that acts as helper between acts_as_list and my desired API:
class Playlist < ActiveRecord::Base
# associations go here
has_many :playlist_items, :order => :position, :dependent => :destroy
has_many
2009 Sep 02
0
Wine release 1.1.29
The Wine development release 1.1.29 is now available.
What's new in this release (see below for details):
- Improved Gecko integration by using Wine's network layers.
- Use of external libmpg123 for mp3 decoding.
- Support for JPEG and PNG formats in WindowsCodecs.
- Many regression test fixes for Win64 and Windows 7.
- Various bug fixes.
The source is available from the
2006 Jul 22
2
How to SELECT from multiple talbes with AR#find and associations?
So I want to SELECT from multiple tables, so as to be able to do
"SELECT FROM foo, bar WHERE foo.id=bar.id AND bar.baz=23".
How do I do it with AR#find?
Also, I need this for associations. has_many et. al. have :finder_sql,
which is nice, but feels like a Pyrrhic: it''s basically doing the
association in pure SQL, defeating the purpose of AR.
--
-Alder
2013 Feb 07
1
[LLVMdev] Nameless Functions in LLVM IR
Hi,
When and why are nameless functions generated in LLVM IR? Also, for
the clarity, is it possible for a nameless function to have external
linkage? (I think not, but I would like to get it confirmed anyway)
--
Anitha
2011 Jun 15
1
.new_record? and :_destroy
Rails version 2.3.8
I have a ticket model that has many comments
the comments have an attribute called "admin" -- is this a comment
added by an administrator
the ticket has an attribute called "admin_email_address"
I want to validate when saving the ticket and say "if I have a new
admin comment, make sure I have an admin_email_address"
In my ticket model, the
1999 Dec 24
0
can't copy files from Win2K RTM
I am running Win2K (RTM build 2195) and ever since RC2 I have had problems
copying files from my Win2K machine to my RedHat 6.1 Linux (stock kernel
2.2.12-20) box. The Linux box is running Samba 2.0.6.
I either get:
J:\mail\archive\todo\dingo>copy dmail-122499 \\alder\mikenel
Access is denied.
Or I get a file with a funny character created on the box:
[...]
-rwxr--r-- 1 mikenel mikenel
2006 Oct 13
3
Validation errors in has_one/belongs_to relationships.
I have two objects, QuoteInput and Insured.
QuoteInput has one Insured and Insured belongs to QuoteInput.
I don''t understand what I''m seeing.
I assign an Insured to a QuoteInput. The Insured object has invalid
data.
I call save! on the quote input. QuoteInput has no validations.
I expect two things to happen - 1) an exception should be thrown,
indicating that there was a
2006 Jul 21
2
File.open behavior for ActiveRecord, to ensure save after manipulation?
File.open in core Ruby is nifty, in that it automagically closes the
file when you''re done using/manipulating it. I''m wondering whether
there''s something like that for ActiveRecord?
So you can do:
AR.find(23).open {|ar|
ar.foo = ''bar''
...
}
And ar.save would be called when the block closes.
--
-Alder
2005 Dec 22
0
Errors object missing when saving AR in Web Services method
Hello,
I''m not able to get Errors object when saving some Model instance in
ActionWebService::Base subclass.
I want to create API method that will return ID of the object when saved
successfully. When validation fails and the object is not saved I''d like
the method to return ID, as well as the array of ValidationError custom
struct. But I cannot fill in this because unsaved
2009 Jul 08
0
accepts_nested_attributes_for and has_one
Hi all, I''m seeing some unexpected behaviour in a nested model and I''m
not sure if it''s a bug or if I''m doing something wrong. When
assigning nested attributes, the associated object gets replaced with
a new record.
Example code:
class Car < ActiveRecord::Base
belongs_to :driver
end
class Car < ActiveRecord::Base
belongs_to :driver
end