similar to: How to build a recursive parenting structure?

Displaying 20 results from an estimated 110 matches similar to: "How to build a recursive parenting structure?"

2006 Feb 23
4
MySQL Duplicate Key Error
I am a newbie and I am running into a problem which I cant understand. I have a table called ''privileges'' which has the following fields CREATE TABLE `sdqualplanner`.`privileges` ( `id` int(10) unsigned NOT NULL auto_increment, `name` varchar(20) NOT NULL default '''', `description` varchar(100) NOT NULL default '''', `section_id`
2006 Apr 20
4
ActiveRecord: Many-to-Many problem
I am trying to make many-to-may relationship on classes Section and Content. Both Content and Section has: has_and_belongs_to_many :contents and has_and_belongs_to_many :sections and I have an exception when trying to access model properties: "undefined method `add_contents'' for #<Section:0xb745c514>" def add_content_entry @section = Section.find(params[:section_id])
2006 Apr 18
6
Postgresql and ActiveRecords problems
Hi all. I have a problem with postgresql PK columns and ActiveRecord. The error is: PGError: ERROR: null value in column "item_id" violates not-null. Ok, it''s wrong to insert NULL into PK columns, but rails doing it. How to fix? So sad..
2004 Jul 16
2
where to sign up for fwd
Could someone please point me to the proper url to register for a fwd acount and get a fwd number. I couldn't find it at www.freeworlddialup.com or fwd.pulver.com Thanks, -Galt -- "They that would give up essential liberty for temporary safety deserve neither liberty nor safety." Benjamin Franklin
2006 May 28
1
ActiveRecord: FK constraints problem
Hi all. I have has_and_belongs_to_many association between models: Section and Content. class Section < ActiveRecord::Base acts_as_tree has_and_belongs_to_many :contents belongs_to :default_content, :class_name => ''Content'', :foreign_key => ''default_content_id'', :dependent => :nullify end class Content < ActiveRecord::Base belongs_to
2005 Dec 15
3
Rails: Select and html forms
I''m close to getting this to work, but not quite there. I''m trying to implement a dropdown control, with the current choice selected. I have the following code in the view: 5 <select id="product_product_type" name="product[product_type]"> 6 <%= 7 types = ProductType.find(:all, :order => "product_type") 8
2005 Dec 06
5
How to set a default value?
Hello, I have a price field that I validate of numbers. How can I default a 0.0 value? Regards, Frank Rocco farocco-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org
2006 Aug 07
7
mysql Date field not getting set correctly
I created a simple test to try and pinpoint my problem but nothing seems clear to me. I created a Thing model with fields { id (INT), date (DATE) } now when I try to create a new "thing" the date does not get stored, and no errors are reported. @myNewThing = Thing.new(:date => "2006-08-07") @myNewThing.save this results in a new record with a date of
2005 Dec 19
1
Is there a guide for using ERBSQL?
I''m not sure I completely understand the benefits of using ERBSQL or how to use it. Google searches have proved it to be rather undocumented. From what I understand the embedded ruby sql allows you to write sql that''s easier to deploy via the create_db script and also more portable to postgres, myslq, or whatever. But what I can''t find is a resource that
2006 Jan 30
9
error when adding a new table to the existing application
Deniz wrote: > Hi Everybody, > I am a newbie in this list so please forgive me if this is a lengthy > message. > Currently I am working on a project at my work place that includes > viewing some oracle tables(I do not have control over to rewrite the > tables) and searching the tables based on a given criteria with Rails. > Up untill now everything was working great. The
2006 Aug 12
4
form problem on deployment. Not sure how to debug this.
I wish I could be more clean in the subject but I honestly don''t know what to point at for the problem. I am trying to deploy a rails app to my external host (dreamhost). It works great in development on my machine but when It gets into production on dreamhost Data seems to be missing when I try and submit the form. Here''s what it looks like when it works... Processing
2006 Apr 03
1
Re: F6H500ukUNV working with fentonups driver
Hi Patrick, 2006/4/2, Patrick Beard <p.beard@blueyonder.co.uk>: > Hi Arnaud, > > Just wanted to let you know the the Belkin F6H500ukUNV is working for me > with the fentonups driver. > > http://catalog.belkin.com/IWCatSectionView.process?IWAction=Load&Merchant_Id=&Section_Id=202840 > > I originally tried it with the genericups driver with upstype=7 but this
2007 Nov 17
0
rake errors
Folks, I have a rake task that runs via cron and calls a controller action. I was getting the ''config/boot.rb:28:Warning: require_gem is obsolete'' warning, so I ran rake update:rails. Now I''m getting a whole bunch of errors and the rake task bombs. The traceback on the errors doesn''t seem to make much sense to me. Help? rake task... require
2009 Mar 14
9
null object pattern
I am trying to create a null object in my application. I would like to assigned a null user object for anonymous/ mot-logged-in user, i.e. if session variable has nil data. In my User model, I have created a subclass like this: class UnassignedUser < User def save false end def update false end def username "Unassigned" end def county_id
2007 Jan 25
0
[855] trunk/wxruby2/swig/classes/include/parents.rb: Parenting for GridBagSizer
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!-- #msg dl { border: 1px #006 solid; background: #369; padding:
2005 May 13
0
Problem with IAX trunking
Hi all, I'm trying to get IAX2 trunking between two * boxes and am having extreme difficulty :) What happens is when the sending * server (the one initiating the call) receives the ACCEPT back from the receiving server it immediately replies with INVAL. I've checked the code and it seems to be not matching the accept packet with the relevant item in the iaxs array due to the following
2007 Oct 31
3
Find A, given B where B=A'A
Given a matrix B, where B=A'A, how can I find A? In other words, if I have a matrix B which I know is another matrix A times its transpose, can I find matrix A? Thanks, Mike
2006 Feb 08
1
Weird validation issue
Hi, I''m having a weird validation issue. Validation isn''t working for certain attributes and, for some reason, it''s also affecting things outside of validation. For campers on certain camp types, we require some information about their school. I tried to validate the information this way: validates_presence_of :school_type, :if => Proc.new { |c| !c.booking.nil?
2011 Sep 02
0
Re: New Codeweavers CrossOver discount dealcode coupons avaliabl
Avent Coupons can go a long way in improve the quality of your child?s well being. The best way to look out for these coupons is on internet. But that does not mean it is the only way. These are available in America?s finest magazines about parenting and child upbringing. But still there is no denying that fact that 75% of Americans search through the internet before making any purchases.
2007 Nov 30
2
Nested resources and _path methods
Hi guys, I was thinking aboiut this for a while: If I have nested resource routes, for example /building/1/floor/2/ room/ 3 (building has_many floors and so on), I have to call the room_path method like this: room_path @room.floor.building, @room.floor, @room IsnĀ“t there a better way to handle nested routes with foreign keys, or can I have this method overwritten somewhere? Greets Jonas