Displaying 20 results from an estimated 3000 matches similar to: "how to use set_primary_key?"
2008 Dec 09
3
Problems with getting correct id from query involving two tables
I have a query that is intended to find all "transfers" based on a
condition the uses a second table. In the controller, it looks like
this:
def find_protocols
@transfers = Transfer.find(:all, :from => "transfers,
protocols", :conditions => "transfers.protocol_id = protocols.id AND
protocols.name = \"#{params[:protocol]}\"")
respond_to do
2007 Nov 12
7
schema_info always wants to be 3, even when set to 7
Hi all,
I''m having a very odd problem with db:migrate. I''m using Rails 1.2.5
on Windows XP SP2 and Ruby 1.8.6
I have seven migrations. If I run them with an empty database, it
runs the first three, then halts. When I look in schema_info, the
version is 3.
If I run db:migrate VERSION=7, then it runs through the remaining 4
migrations, and the version is 7 in the DB.
2007 Aug 10
3
[ win32utils-Bugs-12979 ] Error while trying to update my gem collection
Bugs item #12979, was opened at 2007-08-10 15:29
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=411&aid=12979&group_id=85
Category: windows-pr
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Nobody (None)
Assigned to: Nobody (None)
Summary: Error while trying to update my gem collection
Initial Comment:
C:\ruby>gem update
Updating
2007 Dec 10
8
could not find activerecord-sqlserver-adapter locally or in a repository
I''m trying to connect to a SQL Server db. I thought I installed the
DBI component per the instructions, but its not working.
When trying to start the ruby server, I get the message:
Please install the sqlserver adapter: `gem install activerecord-
sqlserver-adapter`
But when I try to install the repository, I get this error message:
could not find activerecord-sqlserver-adapter
2007 Apr 17
0
set_primary_key issue
Hi:
I am new to the ruby and rails. What I am tried to do is to create a
scaffold based on an existing table in a MS SQL Server database.
Before I used the set_primary_key method, edit and show does not work
in the generated code. Rails displayed the list of the records ok, but
can not determine the id for each record. Create a new record does
work properly, however.
After I used the
2005 Jul 25
0
sqlsever, scaffold and set_primary_key
I found what was wrong with sqlserver adapter. I can rename "id" to
other name and it works. Only scaffold does not work correctly. It
ignores my set_primary_key command and is looking for "id" name.
--
JZ
1997 Oct 30
2
R-alpha: Minor plotting problems
1) There's a curious asymmetry between points and lines, in that you can
do
lines(...,type='p')
but not
points(...,type='l')
(and more importantly, not points(..., type='b'), which probably
*could* arise in real work)
This isn't deliberate, is it?
2) Did I remember to report the adverse effect of having plot(x,y)
coerce its argument to numeric? Several of my
2014 Sep 08
2
[PATCH] add mips64 support
On 09/08/2014 05:57 AM, Dejan Latinovic wrote:
>> From: H. Peter Anvin [hpa at zytor.com]
>> Sent: Friday, September 05, 2014 7:13 PM
>> To: Dejan Latinovic; YunQiang Su; klibc at zytor.com; maximilian attems
>> Subject: Re: [klibc] [PATCH] add mips64 support
>
>> Why copy the files rather than share them?
>
> Hi Peter,
> here is new version of
2000 Jun 02
2
locfit version for windows NT version of R
Hi there,
I want to install locfit in R for Windows NT. I have recently downloaded
the file locfit.zip from
http://www.ci.tuwien.ac.at/R/bin/windows/windows-NT/contrib/
but it doesn't include any explanation on how to do the installation.
Have anybody done this? If so I'd really appreciate your help.
Cheers,
Oscar
--
-------------------------------------------------------
Oscar
2006 Jun 19
3
Using set_primary_key breaks acts_as_tree with non-integer column
I just switched from using the standard "id" column into using my own
primary key and generating my own unique id for each record. But, this
breaks acts_as_tree.
Because my new primary key is not an integer, it breaks the SQL query
as follows:
StatementInvalid in PagesController#create
--------------------------------------------------------------------------------------
2015 Jan 24
1
[PATCH] add mips64 support
On 12/15/2014 05:56 AM, Dejan Latinovic wrote:
>
> Hello,
>
> Any updates on mips64 support for klibc?
>
> Can I do anything to help merging
> mips64 changes?
>
Sorry, my personal life exploded in late August, and I have bee
chronically behind ever since.
Is this the only patch needed?
From: Dejan Latinovic <Dejan.Latinovic at imgtec.com>
Subject: [PATCH]
2007 Dec 23
8
will_paginate wont_paginate for me!
Sorry for the cheesy topic name couldn''t resist.
B4 I go into details I''m rocking Rails 1.2.6. I''m hosting on MediaTemple
and they seem to working on some issue between their grid servers and
2.0.
I''m struggling with pagination. I spent a few hours discovering that
everyone thinks you should use a plugin to do your paginations. It seems
will_paginate is
2005 Nov 15
2
conversion from RData to R file
Dear all
I am beginner in R coding and have a problem to figure out how to
convert RData format into R format.
After I converted csv file using read.csv I got RData file but to run
some R code need R format
Many Thanks
Dejan
[[alternative HTML version deleted]]
2006 Jul 07
5
link_to: link is missing id
I''m using a legacy table, where the unique id is not ''id''
I have a Model class like the following:
class Article < ActiveRecord::Base
set_primary_key "ARTICLE_ID"
end
however, using a link_to like the following (modified scaffolding),
the link has no id value:
<% for article in @articles %>
<tr>
<% for column in
2006 Mar 09
2
turn off auto increment
Hello,
I have an old table that handles sessions. the primary key is a field
called session_id and is the actual session id like "8df838303ufdfu838"
however when i do the following in the model:
set_primary_key "session_id"
and the following in the controller:
@session_hash = { "session_id" => @session.session_id, "session_user_id" =>
2006 Jan 27
4
find.collect problem.
Hi all.
I am trying to populate a dropdown based on two values.
def self.clientref( reference )
@bugclientrefs = self.find_all(["bug_id = ?", reference]).collect {|b|
[ b.client_id.strip << " - " << b.client_ref.strip ]}
end
This works fine. However this returns the reference to the client. I
want the full name using this function.
class Bugclient <
2014 Sep 05
2
[PATCH] add mips64 support
On 09/04/2014 07:57 AM, Dejan Latinovic wrote:
> Description: All files are copied over from klibc/arch/mips,
> and used witout any changes and aditional adaptation.
Why copy the files rather than share them?
-hpa
2001 Feb 03
1
WIN32 files have unix-style linebreaks?
Is it just me or doesn't all the Win32 files have unix-style EOL codes?
I downloaded the nightly CVS tarball and tried to compile it in Visual
Studio 6 but it failed partly because of that reason. It didn't even want
to recognize some of the files (ie *.dsp files).
It's a fairly simple operation to fix the problem but I don't know if it's
my fault or if it realy something in
2006 Jan 17
15
legacy database and finder_sql nightmare!
This is my first rails app with a legacy database and I''m having a
terrible time getting the models set up correctly. I have an order
table that has a primary field named order_number. I have a name table
with a primary of item_number. These two tables are liked by the
item_number and the order_number, but not as you might think. If the
order_number is 2500, then each entry in
2006 Jan 18
3
legacy database on remote host
I''m getting this error in webrick then it crashes leaving nothing in the
log.
ruby: symbol lookup error:
/usr/lib/ruby/gems/1.8/gems/mysql-2.7/lib/mysql.so: undefined symbol:
mysql_sqlstate
Here is the standard query I would normally write to get the data.
select * from child,parent
where CONCAT(SUBSTRING(child.item_number,1,14,''00'') =
parent.order_number and