similar to: newbie

Displaying 20 results from an estimated 100000 matches similar to: "newbie"

2006 Mar 21
3
Newbie - ActiveRecord relationships
So I''ve worked through Agile Web Development with Rails and I''m now trying my first little app to get into the swing of things. Its a task tracking app where people can create tasks and assign them to others, and also log time against the tasks. I''m having trouble working out the model relationships. This is what I''ve got so far, but its not right as
2006 Jul 18
2
newbie help re: loading data and relationships in migrations
Hi folks, I''m new to Ruby & Rails, and have been reading the Agile Web dev & Pickaxe books with much joy! However, I need some guidance re: using migrations to load in data for tables that have relationships. For example, I have one products table and one product_photos table (defined in separate migration files). The second table has a foreign key associated with the
2005 Oct 05
0
has_and_belongs_to_many on legacy DB
I am working with mapping ActiveRecord onto a legacy database. All is going well (using set_table_name, set_primary_key, etc), but I can''t get my many<=>many relationships to work. My contrived example of the situation: Student has_and_belongs_to_many Teachers. This is mapped via table student2teacher where the foreign keys are studentId and teacherId. The primary key in Student
2006 Jan 12
0
Easy Question, I Think [re-post, sorry if dupe]
I am just getting started with Rails, don''t know any Ruby, and don''t quite even get object oriented programming yet. I have tweaked my schema to The Rails Way and have generated a bit of scaffolding. I am trying to create a new Part, which references a PartName and a PartNumber. I can create a PartNumber on the fly, but the PartName has to exist. I have an inelegant solution
2006 May 26
0
has_and_belongs_to_many with fk constraints?
Hi folks, I''m wondering if it''s possible to use foreign key constraints on the join tables of a has_and_belongs_to_many relation. Specifically, I get this error when I try and delete a model I''m using, named saved_search, which is many-to-many with neighborhoods. Any ideas? Thanks for any help. :-) -Eric Code: @saved_search.destroy Error: Mupdate or delete on
2006 Feb 26
5
Help On Associations Extension.
Hi to all, I''m needing some help here ... I want to do an extension on a has_and_belongs_to_many to build a custom add method to the association. i have a table locations that has a many-to-many association with a tags tabel using a locations_tags table. i want to add a method to the Location has_and_belongs_to_many association so that i can do something like this on the location
2006 Nov 06
1
Hmisc, latex cdec not as expected - again
Hello all. Sorry for reposting this message, but I accedently sent it in HTML-format the first time. I have encountered at problem when using the Hmisc package to generate latex-tabels. I can't seem to control the number of digits in the latex-file. I have used the Design and Hmisc packages for a while without this problem, but after upgrading to R-2.4.0 the problem has occured. I
2006 Sep 29
1
newbie Q: it won't display foreign keys...
I have two tables CREATE TABLE continents ( id int(11) NOT NULL auto_increment, name varchar(255) NOT NULL, PRIMARY KEY (id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE countries ( id int(11) NOT NULL auto_increment, name varchar(255) NOT NULL, continent_id int(11) NOT NULL, PRIMARY KEY (id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; I generate scaffolds for country and for
2007 Sep 05
8
Hi..Guys new plugin again
Hi.. Guys new plugin again Foreign Key Associations is a plugin that automatically creates associations based on foreign-keys. The associations are created at runtime-ie. as your ActiveRecord models are loaded-so they will always be up-to-date. For example, given a foreign-key from a customer_id column in an orders table to an id column in a customers table, the plugin creates:
2006 Mar 20
2
AHHHhhhhh... has_and_belongs_to_many, that is going on?
I don''t have a class by the name of "ReviewersScoreCard", yet my many to many configuration looks as follows. And, these errors while running some simple test with ./script/console is giving me a headache: ./script/console Loading development environment. >> r = Reviewer.find_first => #<Reviewer:0x19d0a48 @attributes={"id"=>"1",
2006 Nov 06
0
Hmisc, latex cdec not as expected
Hello all. I have encountered at problem when using the Hmisc package to generate latex-tabels. I can't seem to control the number of digits in the latex-file. I have used the Design and Hmisc packages for a while without this problem, but after upgrading to R-2.4.0 the problem has occured. I have mad a clean installation where I uninstalled all earliere version of R, and I
2006 Jan 11
0
Easy Question, I Think
I am just getting started with Rails, don''t know any Ruby, and don''t quite even get object oriented programming yet. I have tweaked my schema to The Rails Way and have generated a bit of scaffolding. I am trying to create a new Part, which references a PartName and a PartNumber. I can create a PartNumber on the fly, but the PartName has to exist. I have an inelegant solution
2005 Dec 17
0
Passing multiple parameters with select-option to controller
Hi all, I''m using Windows Xp, Mysql 5, Webrick, Rails 1.0 I''ve 3 tables which have HABTM relationship. My tables names are all set to uncountble. Name of tabels are anabilimdali (includes department info id name etc.), ogretimuye (personel information like id , name , dept. ) yayin (document information), and for relationships yayin_anabilimdali , yayin_ogretimuye . The
2006 Jul 15
1
Relationship problem, newbie problem, need help!!
Hey all I seem to be having some problems with my relationship between a few tables... If i then run the following query in mysql, i get the data i want. How do i do this in rails relationships and models? select * from shop_addresses left join shops on shops.id = shop_addresses.shop_id left join styles on styles.id = shops.style_id where shop_uri = ''127.0.0.1'' Cheers!!
2006 Dec 30
4
newbie question, "show items in selected city and category"
Hi, rails newbie needs help :) I have classified ads (cads) related with cities and categories: class Cad < ActiveRecord::Base has_and_belongs_to_many :categories has_and_belongs_to_many :cities end class Category < ActiveRecord::Base has_and_belongs_to_many :cads end class City < ActiveRecord::Base has_and_belongs_to_many :cads end I assume that user can act such
2006 Jan 19
0
Help with nested HABTM relationship
Hi, I am trying to perform a query with ActiveRecord that I want to put into a Rails application later. For now I just wrote it within a plain old Ruby script for easier testing. I am working with an existing database so I had to map some foreign keys myself. As you can see from the models below, the database has a structure of Prospectlists <=habtm=> Contacts <=habtm=> Accounts
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
2006 Jul 13
1
How to create a child from a parent
Hi i am trying to figure out what is the best way to do this very basic thing: lets say i have two tables: one with parents and one with children. there is a one to many relation between them. I scaffolded the parents tabel and i can open each parent. Now i want to add a link to the ''show'' view which will create a new child record. In the model i defined the has_many and
2006 Mar 30
5
Heeelp - no idea what''s going wrong.
I''m working on a simple CMS. The main data type are "listings" a listing habtm (has_and_belongs_to_many) categories and subcategories. Subcategories belong_to categories. Subcategories are basically the same as categories, but they are treated differently in a few situations. The problem is, I can''t seem to write the view/controller/model code that allows me to
2006 Feb 21
3
HABTM :insert_sql help
Hi all, I''m working with a legacy sqlserver db and I''m trying to override the insert sql in as defined in the HABTM method below(becasue the join has three primary keys), but I''m getting the error: ''undefined local variable or method `record'' for Project:Class'' has_and_belongs_to_many :people, :class => ''Person'',