Displaying 20 results from an estimated 120 matches similar to: "Parent-Child Tables Help"
2003 Dec 30
4
Assignments in loops
Greetings all. Any help with the following would be appreciated.
I want to create a data frame for each file in a directory. The following
code does not work but it may show what I am trying to do:
carmakes <- c('BMW','Chrysler','Citroen','Fiat','Ford','Holden','Honda',
2011 May 21
1
'apply' with additional class variable
Dear R gurus,
I'm trying to solve what I assume is a fairly simple problem, but I'm having trouble finding the proper approach. I have a matrix where each column is some object (e.g. a car) and each row is a numeric measurement of a feature of said object (e.g. horse power, top speed, etc.). Let's also suppose that I know what make the car is (e.g. toyota, ford, etc.), stored in a
2006 Jul 10
18
Deleting join association of has_many :through
I''m trying to use has_many :through, since my join model deserves being
more than just an intersection table.
But when I try to break the association, the break only seems
"temporary":
Let''s say my two tables are Users and Colors, and the join model is
Favorites.
user = Users.find(1)
user.colors.length
>> 2
c = user.colors.first
>> #<Color:....>
2008 Feb 28
2
change drop down list to radio buttons
In my RoR app I would like to change a drop down list, which dispays a
list of colors selected from the database. Instead I would like to
create a radio button for each color. The user is allowed to check one
color and this will be saved back into the database as the color for
this user.
I don''t know how to do this. Currently it looks like this:
<%= select(:user, :color_id,
2006 May 14
4
searching on foreing keys
Hey all,
I''m using a simple search function. It''s working
great except for foreign keys.
I have one table pets (id,name,owner_id)
and another table people(id,name)
owner_id being a foreign key of pet pointing to people name.
here it is on the pet controller:
@paginator, @pets= paginate(:pets, :conditions =>["name OR owner_id
like
2006 May 22
6
existing magic to prevent db redundancy?
suppose users have a favorite colour, linked to with a color_id field.
suppose also they have a pet rock, which is one of many possible
colors...
is there a ''best practice'' in order to avoid having ''blue'' appear in the
Color table 100 times. can validates_uniqueness_of be twisted into
handling this case? should i be adding something to the initialize()
2006 Mar 01
0
link_to problem when used in folder
I have split my appliction into 2 folders - public and restricted areas:
"site" and "admin"
Now, in "site" i have a "search" controller with the "results" action. I
want to make a link that will keep all the parameters of the link
<%= link_to ''link'', params %>
However, instead of something like:
2005 Oct 05
3
Shopping Cart: SKU and Product Confusion
Hi there,
I''m at a loss...
I was on the #ROR channel last night and spoke to a really helpful person
(Defiler) who gave me some direction on building a shopping cart.
Unfortunately, I wasn''t able to successfully get to where I need to go. This
is the predicament I am currently finding myself in:
I''m building a shopping cart for a client''s new website. They
2009 Apr 24
1
RoR - getting started with database relations
Hey everyone... I''m just getting my feet wet with relational databases
using RoR models. The software I''m putting together relies on car
parts. Originally I had the database set up as follows
create_table :parts do |t|
t.column :year, :string
t.column :make, :string
t.column :model, :string
.
.
.
end
However, I now realize it''s much better to do it using
2006 Apr 27
7
Role Based Authorization recipe implementation?
i got the rails recipes book, i have now an auth system for users
without problems, now i want to made a role based acces for my app, im
following the "Role Based Authorization" recipe of the book but i cant
make it to work even when the tables created and correctly added data
manually definig the roles and rights. als i dont know how to define a
right for use all the actions in a
2006 Apr 24
4
Joined search returns NIL ids
I have two models: assets and makes. Make has many assets and an asset
belongs to one make.
I am calling this part of my asset controller from a search form with
the parameters "search" (search term) and "field" (database field
heading) which then renders a partial with the search results on it.
########################################################
if
2019 May 20
1
WISH: Built-in R session-specific universally unique identifier (UUID)
# Proposal
Provide a built-in mechanism for obtaining an identifier for the
current R session, e.g.
> Sys.info()[["session_uuid"]]
[1] "4258db4d-d4fb-46b3-a214-8c762b99a443"
The identifier should be "unique" in the sense that the probability
for two R sessions(*) having the same identifier should be extremely
small. There's no need for reproducibility, i.e.
2006 Mar 29
4
HELP: Rails / Ajax with 3 Drop down lists (see code)
Hi All,
I have successfully implemented a two tier drop down lost with rails.
However I''m stumped on how to make a third tier. For example: The form
has three select lists; Catagory, Subcatagory and Make
User Experience Desired:
1. On page load a Catagory Select List shows a list of Catagories from
the database. example:
Portable Electronincs
Laptops
etc.
2. Upon select of Catagory
2006 Jan 09
0
Problem with publishing subclasses by AWS API specification
Hi,
I''m quite new to Rails and have a problem with the use of AWS.
The Problem is, that I have a class which provides some basic attributes
and some subclasses of this with more specific attributes. I want to
send objects of those classes through SOAP by a remote client, but if I
specify just the base class in the method signature of my API definition
the generated WSDL file will
2006 Jan 11
0
HELP!! - Problem with AWS and subclasses
Hi,
I''m quite new to Rails and have a problem with the use of AWS.
The Problem is, that I have a class which provides some basic attributes
and some subclasses of this with more specific attributes. I want to
send objects of those classes through SOAP by a remote client, but if I
specify just the base class in the method signature of my API definition
the generated WSDL file will just
2007 Nov 02
0
How to edit many-to-many -- rhtml setup?
I''ve got two tables: "colors" has a color and id column and rows "red",
"green", blue". "cars" has maker and id columns and rows for "ford",
"chevy", "dodge". I''ve got a 3rd table, inventory. It''s got columns
for car_id, color_id and qty. So I''d like to display a table on screen
that
2008 Nov 05
0
[PATCH] blktap: ensure vma->vm_mm''s mmap_sem is being held whenever it is being modified
As usual, written and (build-)tested on 2.6.27.4 and made apply to the 2.6.18
tree without further testing.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Index: head-2008-11-04/drivers/xen/blktap/blktap.c
===================================================================
--- head-2008-11-04.orig/drivers/xen/blktap/blktap.c 2008-10-01 16:35:04.000000000 +0200
+++
2006 Sep 05
0
rake craziness with Migrate as a dependency
Hi everyone,
For one of our projects we have a need to deploy and maintain a demo.
As a result I''ve attempted to setup a set of rake tasks for the job.
My goal is have one rake task called "deploy_demo" which purges the
database, migrates to the current schema, and loads the db from a set
of fixture files in a specified location.
I''ve written two new tasks the perform
2009 Apr 27
0
VIF's in R using BIGLM
Dear R-help
This is a follow-up to my previous post here:
http://groups.google.com/group/r-help-archive/browse_thread/thread/d9b6f87ce06a9fb7/e9be30a4688f239c?lnk=gst&q=dobomode#e9be30a4688f239c
I am working on developing an open-source automated system for running
batch-regressions on very large datasets. In my previous post, I posed
the question of obtaining VIF's from the output of
2008 Jan 21
4
Rails app cannot connect to Ferret server
I have installet the Ferret gem v. 0.11.6 and the latest acts_as_ferret
plugin from
svn://projects.jkraemer.net/acts_as_ferret/tags/stable/acts_as_ferret
I''ve followed the instructions here
http://projects.jkraemer.net/acts_as_ferret/wiki/DrbServer to set up the
server, and put acts_as_ferret :remote => true on one of my models (Ad)
I can also start the ferret_server, but when