Displaying 20 results from an estimated 6000 matches similar to: "ActiveRecord & Prepared Statement"
2010 Aug 18
3
How to read ANOVA output
Hi folks,
Where can I find document re "how to read anova output"? Google found many of
them. But seemingly non of them can explain to me following output:-
> tabA = c(5.67, 5.67, 5.55, 5.57)
> tabB = c(5.75, 5.47, 5.43, 5.45)
> tabC = c(4.74, 4.45, 4.65, 4.94)
> tabs = data.frame(tabA, tabB, tabC)
> tablets = stack(tabs)
> anova(lm(values ~ ind, data =
2005 Oct 14
10
Active Record: Prepared Statements?
Hello all,
my first project is on it''s way, and I am loving it!
But, and that''s a big BUT:
Active Record does not use prepared statements! How is that? Everybody is
bragging about performance and the most obvious tuning measure is missing.
Ok, I don''t know, if MySQL can even do them as I am using Postgres, but
still.
I started looking at the code and it is not
2005 Apr 15
2
children of objects are not instantiated?
Hello,
I''m a Java developer and I''m looking at Rails as a very interesting thing.
I read the article
http://theserverside.com/articles/article.tss?l=RailsHibernate
and saw a couple of things that I didn''t like too much:
1) The N+1 problem
This has been discussed in the thread (or should I say "flame"?) "Java
people want to beat us". It seems
2005 Apr 20
1
update without find
Can I update an object without "finding" it?
I mean I think that
@outing = Outing.find(@params[:id])
if @outing.update_attributes(@params[:outing])
...
will select the Outing object from the db and then update it. But
suppose I want to update the object without selecting it (and knowing
that all the properties of my object are in "@params[:outing]"). Could I
do
2009 Aug 12
5
Challenge for object_id, Garbage Value
I am facing strange problem.
I have an object @part=MainPart.find(:all)
1. @part.each_with_index do |mainpart,index|
2. <p><%= mainpart.object_id%></p>
3. end
Here problem is that object_id is reserved for rails. Here
object_id field in my table . Now i want to get value <%=
mainpart.object_id%> is giving GARBAGE VALUE. Is there any solution
apart from
2006 Feb 28
3
Object#id will be deprecated?
I didn''t get the memo on this :P
members_controller.rb:12: warning: Object#id will be deprecated; use
Object#object_id
Line 12 is:
@member = Member.find(@current_member.id)
How _should_ I be writing that line?
Thanks,
Joe
--
Posted via http://www.ruby-forum.com/.
2001 Mar 28
2
nchar on data.frames
I don't understand why nchar() gives different string lengths for vectors
in a list than it does for vectors in a dataframe. Here's a snippet of
code:
> temp <- list(text=c("thug","jimbob","apple","thug"),numbers=1:4)
> nchar(temp$text)
[1] 4 6 5 4
> temp <- data.frame(temp)
> nchar(temp$text)
[1] 1 1 1 1
Could someone explain
2009 Jul 21
1
[PATCH server] Fixed db-omatic so it doesn't segfault because of newer qmf api.
---
src/db-omatic/db_omatic.rb | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/db-omatic/db_omatic.rb b/src/db-omatic/db_omatic.rb
index 155ff5e..b5b7b81 100755
--- a/src/db-omatic/db_omatic.rb
+++ b/src/db-omatic/db_omatic.rb
@@ -270,10 +270,10 @@ class DbOmatic < Qpid::Qmf::Console
end
def object_props(broker, obj)
- target =
2006 Apr 11
2
Mapping contained objects to forms?
I''m having lots of trouble trying to map an object that contains another
object to the right forms param. So say I have Book which has one
Publisher. Here is what I''ve tried:
<p><label for="book_publisher">Publisher</label><br/>
<%= text_field ''book'', ''publisher.name'' %> </p>
Then
2005 Dec 28
1
FCGI: warning: Object#id will be deprecated; use Object#object_id?
I am seeing some strange entries in my Apache error log from FCGI that I
don''t understand.
I have pasted one of the lines below.
Anyone seen this or know what might be going on?
[Wed Dec 28 08:35:50 2005] [error] [client 24.115.131.100] FastCGI: server
"/home/www/apps/appname/public/dispatch.fcgi" stderr:
/home/www/apps/appname/app/views/photo/fullsize.rhtml:26: warning:
2011 Mar 15
8
Problems with Object#id deprecation
Hello everyone, in a test helper in my app I call category.id that gets the
id of category in the database. However, when running RSpec I get the
following error:
As a parla customer
/Users/saulolopes/code/parla/spec/acceptance/support/paths.rb:13: warning:
Object#id will be deprecated; use Object#object_id
/Users/saulolopes/code/parla/spec/acceptance/support/paths.rb:13: warning:
Object#id
2006 Nov 20
1
undefined method `stringify_keys!' for "4":String - Meaning of this?
Hi, I have the following on a view
<% for evaluation in @evaluations %>
<td><%=h evaluation[0].name %></td>
<td><%=evaluation[1].object_id %></td>
<td><%= link_to( "Start", :action =>''evaluatie'', :id =>
evaluation[1].object_id) %></td>
<%end%>
When I click on the link, I can see that
2012 Nov 12
3
Updating objects in arrays
Perhaps this is a Rails issue. However, I need to first determine whether
I simply am missing something about updating members of an array.
I have an array of 10 ActiveRecord objects. I wish to iterate over the
array and update an attribute. When I do this the underlying table row
changes but the object in the array frequently does not. For example:
count = 0
current_entries.each do
2005 Dec 20
3
Advanced Routing and Secondary ip address in eth0
Hello,
I have configured advanced routing with success using three (03)
network adapters ( ETH0, ETH1 and ETH2).
Now I have to configure an addittion range in the same Interface
ETH0 ( another internet ip range address ), so I would like to have TWO
different ranges at the same ETHERNET CARD ( in this case ETH0 ) AND
having advanced routing running it.
I Did the same
2010 Nov 12
3
Updating oVirt Server to the latest Matahari 0.4.0 schema
Hi all,
I looked at patching oVirt Server to work with the latest Matahari schema, from Matahari's 'next' branch, version 0.4.0.
ovirt-server depends on matahari version 0.0.5, which is currently latest in Fedora, and it is used during Node registration, to enumerate hardware information.
Usage extracted from src/host-browser/host-register.rb is as follows:
host_list =
2008 Mar 11
2
trouble with MyPublisher.deliver_story
hi,
I can''t seem to be able to delivery stories!
I have this in my controller
MyPublisher.deliver_story(@current_facebook_user.friends.first,
@current_facebook_user, @object.id)
This is in models/my_publisher.rb
# story is published to the story of the to user
def story(to, f, object_id)
send_as :story
recipients to
title "An object?"
body
2006 Mar 21
5
Object#id being deprecated - Rails 1.1
Hi
Think this is probably straightforward, but I don''t know enough about
rails to work it out, so was wondering if anyone can help
I keep on running into this error when I''m deploying my app:
"FastCGI: server ".../public_html/public/dispatch.fcgi" stderr:
../config/../app/views/items/_side_share.rhtml:8: warning: Object#id
will be deprecated; use
2006 Jan 19
3
problems with migrations in sql server
Is anyone using migrations with a SQL Server database who might be able to
lend me a hand? I''ve used migrations with MySql in the past and haven''t
run into any issues so forgive When I run rake migrate nothing is actually
getting updated in my database. I created a migration using
./script/generate migration AddFooTable and updated the migration to look as
follows:
class
2006 Jan 10
5
using dynamic element ids with visual_effect
Mike and I demo an Ajaxified version of the Depot application in the
Rails Studio. Part of the demo is a cart in the sidebar which updates
when you add a product to it. As well as updating the div, it also
highlights the most recently added link item. Right now, we do it with:
<script language="JavaScript">
function flash_cart(request) {
var id =
2006 Jul 15
2
FieldQuery not returning anything
Hey ..
The QueryParser RDoc page explains to me on how to search for a specific
value in a specific field. This is not working the way i thought it
should be, what am i doing wrong? Here''s an example ..
I''m storing model data in the index like this:
doc << Field.new( "object_id", object.id, Field::Store::YES)
doc << Field.new( "type",