similar to: gem rails 1.1.0.200411231446 flags has_many error

Displaying 20 results from an estimated 4000 matches similar to: "gem rails 1.1.0.200411231446 flags has_many error"

2006 Jan 10
5
Noob ActiveRecord Join Question
I''m new to rails and ruby, and after trying to get this to work correctly for hours, I thought I''d give this forum an try. I''ve setup a trivial project just to mess around with Rails database naming conventions and associations. I''ve got a table called Pets, and a table called Types. Pets contains a list of pets, Parky the cat, Daisy the dog, etc, And Types
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
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")
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
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
2006 Jan 04
5
habtm recusive
I have a people table: CREATE TABLE people ( id int(10) unsigned NOT NULL auto_increment, first_name varchar(75) default NULL, middle_name varchar(75) default NULL, last_name varchar(75) default NULL, PRIMARY KEY (id) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1272 ; and a people_people table: CREATE TABLE people_people ( person_id int(11) unsigned NOT NULL,
2006 Mar 28
5
Rails 1.1 for new apps only
Hi, I was very excited to hear that Rails 1.1 project has been released. It gave me the fire I need to get started on a pet project I''ve been thinking about. However I have a couple apps that don''t seem to play nice with Rails 1.1, mainly Typo. So my question is: How can I install Rails 1.1 for only a new application? thanks, scott.
2008 May 13
2
[LLVMdev] Python bindings available.
Hm. I may misunderstand, but I'm not sure that's an improvement over the problem you're trying to solve. How about something like this? (Please forgive any accent; I don't speak snake fluently.) class Pet(object): @staticmethod def new(): # Create a 'free' pet. It can later become owned, but not to more than one owner. return
2006 Dec 02
2
Strict STI?
Is there a way to set the base class to abstract? or otherwise enforce that no one can create a "Pet"? Pet < ActiveRecord Dog < Pet Pig < Pet I''ve tried: class Pet < ActiveRecord::Base validates_presence_of :type end but I get an error about ../vendor/rails/activerecord/lib/active_record/validations.rb:74: warning: Object#type is deprecated; use Object#class
2006 Mar 10
2
adding to has_many on create and edit
Hello, I am fairly new to RoR and I have a question I hope can be solved elegantly (so many things are, so why not this one too?). I have a working solution, but I want to be sure I am doing things the "rails way" (having come from PHP). You could say I am looking for a little validation (no flames please). I have a table of units like so: CREATE TABLE `units` ( `id`
2003 Apr 11
3
summary.formula: method reverse does not use fun argument
hi, recently i discovered the functionability summary.formula, awesome! from the help page i understand that method=reverse allows to summarize all variables on the right hand side of formula (the help page on line 229 wrongly refers to the left? hand side variables) in categories which are determined by a single left hand side variable. my problem is that the argument fun seems not to be
2010 Apr 18
1
Comparing data frames
Dear very helpful friends, It is Sunday, there is no air traffic in Europe, what better to do than try and learn me some more R. I have the following example: owner <- c(1:4) animal <- c("cat", "dog", "cat", "dog") char.1 <- c("fluffy", "playful", "mean", "stupid") food <- c("cat food",
2006 Oct 10
5
oddness when adding to index -
I was having some odd results when working with acts_as_ferret (current trunk), so I decided to test with the current version of ferret to see if I encountered the same problem. I did. Here are the details: installed ferret 0.10.10 on debian sarge with ''sudo gem install ferret'' (btw, same results on OSX) opened up an irb session: irb(main):001:0> require
2010 May 01
1
I need some help joining data from 3 MySQL tables, please
Hi all, I am trying to display collective data from 3 MySQL tables: The query I have, so far, is SELECT c . * , COUNT( m.id ) AS `members` FROM `jos_mls_teams` AS `c` LEFT JOIN `jos_mls_teams_members` AS `m` ON m.teamid = c.id RIGHT JOIN ( SELECT u.name, u.lastvisitDate FROM `jos_users` AS `u` ) ON u.id = m.userid GROUP BY c.id LIMIT 0 , 30 But get the following error: #1248 - Every derived
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`
2007 Aug 05
0
Newbie - Question on Parent child updating
All, I''ve just started Rails and Ruby a week or so ago. Please forgive me for my ignorance. I started writing a small test application to test some of my new knowledge and have hit a wall. Would like some best practices. I have 3 tables, as below... CREATE TABLE `carts` ( `id` int(11) NOT NULL auto_increment, `name` varchar(255) NOT NULL, `quantity` int(11) NOT NULL, PRIMARY
2006 Apr 30
3
require "ajax_scaffold" in model error
Hi there, I''ve got installed ajax_scaffold_generator (3.1.2, 2.2.1) Anyway I''m following the example here <http://height1percent.com/ articles/2006/04/18/ajaxscaffold-3-1-0-released> which suggests the following in a model file: -------------------------------------------------------- require ''ajax_scaffold'' class Pet < ActiveRecord::Base
2008 May 13
1
[LLVMdev] Python bindings available.
On May 13, 2008, at 07:31, Mahadevan R wrote: > Um. Unfortunately in this case, Python will not collect an instance > of Pet which owned by an Owner, because both objects in the > reference cycle have finalizers (__del__). Python will just add both > objects to a garbage list (and will not call any of the finalizers). Actually, there's no reference cycle, which is what I
2008 May 13
0
[LLVMdev] Python bindings available.
Um. Unfortunately in this case, Python will not collect an instance of Pet which owned by an Owner, because both objects in the reference cycle have finalizers (__del__). Python will just add both objects to a garbage list (and will not call any of the finalizers). It does this because it cannot guess which finalizer to call first. But I get your point though, and will try to work this into the