similar to: Noob ActiveRecord Join Question

Displaying 20 results from an estimated 5000 matches similar to: "Noob ActiveRecord Join Question"

2004 Nov 25
1
gem rails 1.1.0.200411231446 flags has_many error
Hi I updated gem rails today and saw that rails had an update. With the new edition, I get a warning statement printed that was not in the two earlier versions. (No message with either: require_gem ''activerecord'', "= 1.0.0" require_gem ''activerecord'', "= 1.0.0.20041114" ) The code still works, but the warning makes no sense. Plus,
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 Jun 19
6
SQL Search Qustion
I am working on writing a search method where a user can type a string of words and I return all the objects that have fields that match all of the words in one or a combination of fields. Person first_name last_name Pet name Person has_many :pets I want to write some SQL so that if I search for "Tony AAAA" I will get all the people who have Tony and AAA either in their
2008 Dec 18
1
inserting zero instances with zeroes in a matrix
Hi all, Suppose I had the below example where a survey was carried out recording the number of each type of pet in each house count<-c(2,1,2,1,2,3,4) house<-c("house1","house1","house2","house3","house4","house4","house4")
2012 Jan 27
1
Horizontal stacked 100% bars with ggplot2
Hello, R friends, I'm trying to crack this nut: Example Data. pet    gender dog    male dog    female dog    male cat    female cat    female cat    male Plot Task. Horizontal 100% bars where y axis shows gender factor (male vs. female) and x axis shows percentage of kind of pets (dog vs. cat) so that % dogs + % cats are stacked in 1 bar and sum up to 100% (for each gender group 1
2005 Mar 03
2
table lookup?
Ok, I''ve been messing with ror for a few days, but I''m stumped here. Here are my tables. CREATE TABLE `steps` ( `id` int(10) unsigned NOT NULL auto_increment, `step_infos_id` int(10) unsigned NOT NULL default ''0'', `translator_id` int(10) unsigned NOT NULL default ''0'', `Sequence` int(11) NOT NULL default ''0'',
2006 Apr 22
9
one to many question
1. A category has parent categories. 2. A product is in many categories and a category has many products. 3. Products and category both have images in the same image table. ie. a product and / or category could have multiple images.<=== my question is related to this So among other things I presume I have to do the following: class Category < ActiveRecord:Base #...
2009 May 13
1
question about setClass
Hi R People: I have a question about setClass please. I'm working thru "R Programming for Bioinformatics". Actually, I was wondering if there is such a thing as an updateClass, in order to change a "contains" option, please? that is, if I had setClass("dog", representation(name="character",paws="numeric",tail="character")) Fair
2005 Dec 23
4
OO model style: inheritance
Hi everybody I am totally new to rails and I am trying to start a tiny project to get familiar with rails. But I already got my first problem and I would be happy if somebody could point me in the best and cleanest direction. I am trying to develop a small gallery app. Since I would like to add more features in future I am trying to design a clean OO architecture of my models: The base object
2006 Jan 09
13
Ajax Tabs
hi railers, I have a model/view/controller with many associations (20+). I would like to display the relative associations using AJAX, allowing the user to display the association his/her is interesting at a particular time. Is here any kind ajax tabs helper or some kind of tab widgets that I can easily incorporate into my rails application. regards, leon -------------- next part --------------
2006 May 18
1
rails & mysql
so for relational associations, do i need to actually be using an rdbms like innodb or bdb? or can i get away with myisam and assume that telling ruby how i want the tables related will be good enough (ie, has_one, has many, etc)?
2005 Dec 12
2
count sql failing with unknown table....
Hey Rails People, I''m doing my first Rails app and I''m having a newbie problem with the count method.... Mysql::Error: #42S02Unknown table ''jobs_sectors'' in where clause: SELECT COUNT(*) FROM jobs WHERE (jobs_sectors.sector_id = 1 ) Extracted source (around line #4): 1: <div class="sectors"> 2: <ul> 3: <% for sector in @sectors
2006 Apr 22
7
Proper Database Design For A Newbie
Hi all, I am starting out learning Ruby on Rails (coming from a PHP background) and I have a question about proper database design. Let me give you a quick example of what I want to do: Database: CREATE TABLE `users` ( `id` int(11) NOT NULL auto_increment, `login` varchar(40) default NULL, `email` varchar(100) default NULL, `crypted_password` varchar(40) default NULL, `salt`
2006 Jul 13
5
Relationships: one model referencing same table for different data sets?
Hi, After I''ve saved, I want to display the Description from the Codes table that corresponds with the ID in the Cause table. Rails doesn''t seem to like that, because on my form, I have two sets of data in combo boxes that come from the Codes table. So, in the show template, I can''t do this: Cause of Death: <%= @cause.code.description %> Any ideas? The
2013 Nov 15
3
[LLVMdev] Buildbot skipping commits?
That would explain it. The commit messages were quite long (especially the second one) and a commit with a smaller message has shown up. Thanks for letting me know. I'll try to keep them a bit more reasonable in future. > -----Original Message----- > From: NAKAMURA Takumi [mailto:geek4civic at gmail.com] > Sent: 15 November 2013 16:28 > To: Daniel Sanders > Cc: LLVM Developers
2006 Feb 14
2
Mongrel 0.3.2 -- The Right Site/All Requests Answered
"Another Mongrel release?! Is he insane?" Yeah, basically. This is yet another release of Mongrel that adds a bunch of little features people requested and I found were needed. This release is almost entirely targeted at Ruby on Rails folks as the majority of the changes went into the mongrel_rails runner. Get this release from the (correctly linked) site: *
2013 Nov 15
2
[LLVMdev] Buildbot skipping commits?
Hi, Neither of my commits so far today have shown up in the buildbot console view. They aren't showing up in the list of changes reported by the changesource either. For example: http://lab.llvm.org:8011/changes/45724 shows r194805, then http://lab.llvm.org:8011/changes/45725 shows r194807. My commit is the r194806 that should be between them. Similarly change 45728 is r194810, and change
2006 Aug 02
2
Ajax_Scaffold display from link table
Hi, Ive followed the pets/people ajax_scaffold example without any problem. I have a table documents and each document has a category. In the documents table i have a field called category_id. So in the documents grif i want to display the corresponding catgory name and when it comes to adding a new category or editing the have a drop down list to select from. category.rb require
2006 Jan 06
6
AWS and array of Model
Hi! I try to use a layered webservice and I want to get back an array of users; In the API I use: api_method :listUsers,:returns=>[[User]] in the service: def listUsers User.find(:all) end Result in soap mode: Don''t know how to cast TrueClass to Object Result in XML-RPC mode: You have a nil object when you didn''t expect it! You might have expected
2013 Nov 15
0
[LLVMdev] Buildbot skipping commits?
Ah, ...no. please don't hesitate to write logs ;) It must be the subject in the buildbot, not in developer guys. Galina, I'll write up later, how to tweak this issue. It is not resolved in released versions, though. The easiest way is to tweak svnpoller. 2013/11/16 Daniel Sanders <Daniel.Sanders at imgtec.com>: > That would explain it. The commit messages were quite long