similar to: Using multiple columns as primary key

Displaying 20 results from an estimated 10000 matches similar to: "Using multiple columns as primary key"

2006 Jan 06
3
Getting model class by string
Hello, I have an interessting problem, I''m not sure how to solve :-) I have the name of a model in a variable like this: My model is called Article My var contains "Article" Now - How do I get the model class, so I can call Article.find, Article.new etc ... ? Greetings, Gitte Wange
2006 Dec 22
3
Zed, you''re a moron :-)
Hi ! My mongrel just starting spitting out these nice lines: The error occured while evaluating nil.accept. TELL ZED HE''S A MORON. !!!!!! UNHANDLED EXCEPTION! You have a nil object when you didn''t expect it! Not sure what happened or why, but just FYI: Zed, you are a moron :-) Happy holidays! Gitte Wange
2005 Dec 28
4
Changing encoding on text
Hello, I have a set of templates creating some files for me. All data on my site is encoded using iso-8859-1. Now I want to save the text in the file using utf-8. I have tried using iconv, but whenever I have the require "iconv" statement in my model, there is some error happening in the model and the model doesn''t get loaded (not sure how to debug that). What approches to
2006 Jan 04
4
Need some implementation ideas :-)
Hi, I have good this cool challenge from my boss on developing a very simple cms-like system to publish articles within. The caveat is that he wants to have multi-lingual content. At first I thought RoR would be perfect for the assignment but right now I''m not so sure. My first attempt involved creating a table for each model/languagde like this: articles_en articles_dk articles_de
2006 Feb 09
4
Ruby 1.8.4 trouble
Hi! The ruby installation on my FreeBSD-6 box have been upgraded from 1.8.2 to 1.8.4 by accident. And now all my rails have stopped working. I can''t produce any cool debug info since I have none. running script/ server just coredumps. Running the sites through apache isn''t an option since apache won''t start (get lots of these in my log: [Thu Feb 09 10:38:19
2006 Aug 02
1
mongrel to execute ruby script?
Hello, I''ve spent a couple of hours now searching for (what I thought) was pretty straightforward. I''m using mongrel together with RoR and need to execute a .rb file located in my public folder (cgi style). But mongrel just can''t do that out-of-the-box - or am I missing something? I really don''t get how I''m supposed to configure mongrel for this
2006 Jan 07
2
Mailing list software
For a project I''m working on I''m hoping to be able to have both discussion and announce-only e-mail lists. Does anybody have any recommendations about good existing mailing list apps that could be integrated with a rails app? Does anybody have any experience using ActionMailer as the basis for a mass mailer? Does it perform well enough to make it feasible? Thanks! -- Dan
2009 Mar 09
3
multiple columns primary key
Hi all, I have two tables: TABLE 1 A pk - fk (referencesc TABLE 2) B pk C pk D pk E F TABLE 2 A pk G H I L I don''t use incremental field (id). I''d like don''t use find_by_sql. How can I define both models to use correctly find method (with include)? With only one column primary key I haven''t problems. I thought two solutions, but I don''t like these
2006 Jan 11
1
Composite primary key
Hi All, How do I specify a composite primary key for a table in ActiveRecord? For example the table Recipe which has the primary key [cookie id, version number] where cookie id is also a foreign key referencing Cookie. Also: Thanks to Nic and Adam for helping with the Cookie -> Cooky problem. /Hugo --SQL * CREATE* *TABLE* `Raw_Materials`* (* id *INT*
2013 Apr 25
2
installing package
Hi I am trying to install a package (bioconductor) but every time I try to install it I get this message: source("http://bioconductor.org/biocLite.R") Warning in install.packages("BiocInstaller", repos = a["BioCsoft", "URL"]) : 'lib = "C:/Program Files/R/R-3.0.0/library"' is not writable Error in
2007 Mar 08
2
Composite Primary Keys
Have been looking into using rails but am finding the "Composite Primary Keys are Bad" thing a tad disturbing (to put it mildly). I have been working with RDBMS systems for over fifteen years and this is the first time I have herd the idea questioned. I have cone across using surrogate keys which mirror the composite key for performance reasons in VERY big databases but I have never
2006 Jul 26
15
Rails without a primary key
I''ve been trying to use Rails on a database where the biggest datawarehouse-style table doesn''t have a primary key. It really doesn''t make sense and just adds extra unnecessary space. I do have, however, a column that I normally use to search on (IP) that returns many rows. The table also references several other tables through rails-friendly foreign keys. Simple AR
2006 Feb 18
14
Composite primary key support in ActiveRecord?
Hi, As I understand, composite primary keys aren''t supported in ActiveRecord yet. May I ask if there are plans for this feature? Better yet, if this feature is under development, how''s the progress going? I''m not trying to use legacy databases. I tend to think that using multiple integer column id''s (composite primary key) are often natural way to
2013 Apr 24
1
R cannot find the path on my mac
Hi I am really sorry for this probably quite simple question. I am new to R, and I am running a pipeline that has already been made. All I have to do is give the paths for different folders, where the pipeline can find the files with my data. But every time I try to run the pipeline it returns with the message, that it cannot find the file. And I really don't know why. I have found the path
2006 Apr 03
4
How to fake composite primary keys?
I know ActiveRecord doesn''t support composite primary keys, but I need to use one, and I need it ASAP. I don''t need any composite foreign keys, luckily; what I have is a table that stores old versions of rows in another table, so the composite key is an id + date stamp. Would someone tell me a hack I can use to support this? -- View this message in context:
2005 Dec 09
1
composite primary keys
Hello, Is it true that Rails doesn''t support composite primary keys? I have a legacy system and was pondering adding a new interface to it. This whole Rails thing (and yes, Ruby too) seems pretty interesting but I''d feel ashamed of myself adding an additional column called ''id'' when there''s already a perfectly good composite key. Assuming the rumors
2006 Jun 21
1
about composite primary keys
hello, what is the strategy you use for composite primary keys ? I saw the solution proposed by Graham Glass ( ticket 3201) using a set_composite_key..., but it seems it is not in AR ....(why ?) thanks for feedback arnaud
2006 Jul 16
0
in_place_edit-like functionality in my controller
Hello, I''m trying to extend the functionality of in_place_edit and would like to have a function in my controller that populates methods for requested object/methods (just like in_place_edit does). Here''s some test code I tried to make work (from my controller): def do_some_edit(object, field) logger.info("We are editing") end do_some_edit(:item,
2006 Feb 12
0
Setting html breaks when using textile (redcloth)
Hello, I would like to enable html breaks when having newlines in my text rendered using textile/redcloth. I have found that a property names hard_breaks should be enabled but I''m not sure where (in which file). Anyone with a hint? :-) Greetings, Gitte Wange
2006 Jan 08
1
Using many-to-many relations in tests
Hello, I have some many-to-many relations, I would like to use in my tests. But I''m not sure what I should put in the fixtures for it? How do I add those relations in the testing environment? Greetings, Gitte Wange