Displaying 20 results from an estimated 7000 matches similar to: "newbie problem with FIND"
2013 May 28
3
AR's find_by_* limits return results. How to avoid id?
When I use find_by_name method I get LIMIT 1 result.
> SELECT "users".* FROM "users" WHERE "users"."age" = 25 LIMIT 1
But the "age" column is not unique in my table and its value may repeat.
So I expect that an array of records where "age" is 25 will be returned.
But AR limits the query by 1.
How to avoid it? Or is it the default
2004 Jun 30
1
help with tclVar
Hi, I can' t load a variable tcltk declared with tclVar, why is this?, the
exmple above explain me ,Thanks Ruben
a<-tclVar(init="")
> f<-function(){
+ a<<-"pipo"
+ }
> f()
> a
[1] "pipo"
> tclvalue(a)
Error in structure(.External("dotTcl", ..., PACKAGE = "tcltk"), class =
"tclObj") :
        [tcl] can't
2005 Dec 09
7
UserEngine - rake bootstrap aborted
Hi there,
I''ve just installed login_engine and user_engine from the repositories,
followed the setup procedures as documented in:
 vendor/plugins/user_engine/README
But I''m getting the following failure:
vince@vaio:~/Projects/Booking$ rake bootstrap
(in /home/vince/Projects/Booking)
rake aborted!
undefined method `edit'' for class `UserController''
2017 Sep 18
6
help matching rows of a data frame
This question likely has a 1 line answer, I'm just not seeing it.  (2, 3, or 10 lines is 
fine too.)
For a vector I can do group  <- match(x, unqiue(x)) to get a vector that labels each 
element of x.
What is an equivalent if x is a data frame?
The result does not have to be fast: the data set will have < 100 elements.  Since this is 
inside the survival package, and that package is on
2006 Jul 21
3
adding numbers
hi! how can i add all the values from one tables field? i mean, i have a
table with the entries of a booking (amount), and at the end, i want to
have the total.
i tried with different loops making a method in the model, but nothing.
im doing something wrong, but i dont know what.
please could somebody help me?
ty!!
-- 
Posted via http://www.ruby-forum.com/.
2006 Aug 02
3
find_by_column_name and for loop returns undef method `each''
I''m trying to understand how to select only certain rows in my database
using RoR.
As a test I try to find certain clients by adding this code in my list
view...
<% clientlist = Client.find_by_client_status_id(1) %>
<% if clientlist %>  <= This prevents me from getting nil errors.
  <% for client in clientlist %>  <= This seems to try and call
2006 Mar 12
3
Newbie: using find like a sql join query
I have a working Rails app with several related tables, but can''t find 
an answer to this question in the Dave Thomas Rails book.  Imagine for 
example:
table departments with columns: id, department_name
table employees with columns: id, department_id, employee_name
and of course the employees table has a constraint foreign key 
(department_id) references departments(id)
So this is
2006 Jul 24
3
administration tutorial
hi!
im learning how to work with sessions. i made a prretty simple login 
system, but i havent found a good tutorial to make a login system with 
permissions (admin can delete,edit,etc) other users only read, edit, etc
do u know where can i find some info/tutorial about that?
ty!!
-- 
Posted via http://www.ruby-forum.com/.
2014 Jun 10
3
OT - Finding/removing duplicate emails - WAS: Re: dovecot/lmtp munmap()-ing a lot
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Tue, 10 Jun 2014, Reindl Harald wrote:
> Am 10.06.2014 15:17, schrieb Steffen Kaiser:
>> On Tue, 10 Jun 2014, Charles Marcus wrote:
>>> On 6/9/2014 5:44 PM, Ralf Hildebrandt <r at sys4.de> wrote:
>>>> That's probably the problem here. The user had LOTS of (duplicate!)
>>>> mails in his inbox.
2010 Sep 12
11
Rails 3: finding a record by name in multilingual app
Hello,
I upgraded my application from Rails 2 to Rails 3 and ran into a
problem. In rails 2 I could use the english name of the record to find
it like:
Page.find_by_name("Welcome")
even though the user chose German as the language (which of course
showed the German welcome page.
Eversince I switched to Rails 3 (default_locale still :en) I can''t find
anything by giving the
2006 Apr 20
2
Count Unique Rows/Values
Hi,
   
  I have a dataset which has both numeric and character values with dupllicates. For example:
   
  155   A
138   A
138   B
126   C
126   D
123   A
103   A
103   B
143   D
111   C
111   D
156   C
   
  How can I count the number of unqiue entries without counting duplicate entries. Also can I extract the list in a object. What I mean is
   Col1 unique count = 8  Unique Elements are :
2017 Dec 07
2
parallel computing with foreach()
I have used foreach() for parallel computing but in the current problem, it
is not working. Given the volume and type of the data involved in the
analysis, I will try to give below the complete code without reproducible
example.
In short, each R environment will draw a set of separate files, perform the
analysis and dump in separate folders.
splist <- c("juoc", "juos",
2006 Jul 02
5
Pretty URLs -> Routes
Hi
I am having issues with getting my pretty urls to work.
routes.rb:
map.connect '':user'' , :controller => ''front'' ,
                        :action => ''list'' ,
                        :filter => ''user''
front_controller.rb:
def list
   @advert_pages, @adverts = paginate :adverts, :per_page => 10
   @user =
2008 Jul 08
3
undefined method `name' ...........
Hi Community....
I''m new in this game, so this might be a easy question, but I have
done my google, without result, so I will try this....
I''m learning ROR, and I''m using Patrick Lens ''Ruby on Rails''  book.
(This is written for ror 1.x - and I''m using NetBeans 6.1 - ror 2.x -
this might  be the problem...)
But...
I have made this
2011 Feb 25
4
means, SD's and tapply
I'm trying to use tapply to output means and SD or SE for my data but 
seem to be limited by how many times I can subset it.  Here's a snippet 
of my data
 > stems353[1:10,]
      Time DataSource   Plot Elevation Aspect Slope     Type Species 
SizeClass Stems
1  Modern    Cameron 70F221      1730    ESE    20  Conifer    ABCO    
Class1     3
2  Modern    Cameron 70F221      1730   
2006 Jul 17
10
getting the user name
Hi I am new to ruby and trying to obtain the user name in the login 
index.rhtml where I could display "You have logged in [user name]"
How could I do this? I have been trying different options after reading 
the ruby manual but still throw an error.
please help
-- 
Posted via http://www.ruby-forum.com/.
2007 Mar 27
6
how does rails do this "find_by_?"
Hello there,
I''m wondering how do they create functions on the fly?
find_by_any_column_name ??
I want to do something similar with my models, but I don''t really know
how to do it?
user_current_nickname
user_current_id
user_current_role
etc.?
Regards,
Jamal
-- 
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this
2006 Apr 20
7
Rails + postgres case insensitive searches.
Hello all
I am wondering how rails handles case sensitivity in databases. If I
do a Person.find_all_by_name("tim") in mysql I would expect to get 
tim, TIm, and Tim.  Do I only get tim in postgres?
How do other people deal with this? Do you resort to find_by_sql for
all your postgres queries to get case insensitive results?
2003 May 15
2
FW: iHEADS UP: ipsec packet filtering change
> -----Original Message-----
> From: Greg Panula [mailto:greg.panula@dolaninformation.com]
> Sent: 12 May 2003 11:10
> To: Matthew Braithwaite
> Cc: stable@freebsd.org
> Subject: Re: iHEADS UP: ipsec packet filtering change
> 
> You don't really need the gif tunnels for ipsec.  Gif is more geared
> towards ipv4 <=> ipv6 type tunnels.  A few of ipsec
2007 Jun 18
2
extending Array class with a method
Hi,
Let''s say I have an ActiveRecord::Base class and I want to be able to
call a method on an Array of these items.  For instance, perhaps
there''s a class called Country and another called business, and I''d
like to be able to do something like
great_white_north = Country.find_by_name(''Canada'')
canuck_enterprises = great_white_north.businesses