similar to: Legacy Data without Primary Keys

Displaying 20 results from an estimated 11000 matches similar to: "Legacy Data without Primary Keys"

2006 Apr 20
2
acts_as_taggable magic.... please explain
Hi, There is a line in acts_as_taggable plugin: send(acts_as_taggable_options[:from]).tags.find_or_create_by_name(name).on(self) could someone explain what is: send(xxx) and .on(self) I cannot find it rDoc -- Posted via http://www.ruby-forum.com/.
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 Feb 28
0
ActiveRecord: Legacy primary keys
Hi, I''m building a frontend for a legacy schema, with tables like this: CREATE TABLE `types` ( `a_type_cd` varchar(6) NOT NULL default '''', `a_type` varchar(30) NOT NULL default '''', PRIMARY KEY (`a_type_cd`) ); The primary key is specified by the user (not auto-generated), and needs to be updateable. I create the following a base class to
2010 Dec 20
2
foreman issue
Hello! I try to use foreman. It''s successfuly import current nodes from puppet storeconfig. Nodes hostname stored in short form, without domain. After that, i run puppet on newly created additional 5 nodes. They shows in foreman with full fqdn. Os, environment, architecture for this nodes not shown. How can i fix this issue? -- You received this message because you are subscribed to
2006 Aug 02
6
Legacy association without primary key
I have a legacy database with which I need to interface. There are two tables that are joined together by two fields, and neither field is the primary key of its associated table. Is constructing an association between these tables beyond the capability of Rails? -- Posted via http://www.ruby-forum.com/.
2006 Mar 14
7
Single form w/ relationships: how do I integrate it?
OK - I know this has been asked before, but I cannot find it in the archives. Forgive me if I''m creating more noise than I should. I want to know the easiest way to deal with this scenario: I have articles. I have categories for the articles. On the form where you write an article, there needs to be a free-form field to entire the category. The create() method will build the
2007 Sep 16
4
How far to go with ActiveRecord unit tests without hitting the database?
I''m currently try to push my limits a little bit with some of my unit testing -- trying to avoid saving ActiveRecord objects to the database and take advantage of mock/stub objects. How far should I expect to get in this direction? From what I can tell, ActiveRecord seems to fight me when it comes to associations. In other words, many associations seem to require database queries.
2006 Apr 13
2
Legacy database with varchar2 primary key?
I rememeber seeing an article about how to cope with legacy databases where the primary key is defined as VARCHAR2. I only want read-access to the data. Does anyone have a link to such an article? Or can give advice? -- Posted via http://www.ruby-forum.com/.
2006 Jul 20
3
AOP in Prototype / JS
Hey folks I am just investigating using Aspects for logging my main Javascript "interfaces". I don''t believe Prototype has any built in capabilities for this but I just thought I''d check and see how people had tackled this before. I am still getting to grips with core JS so apologies if this is easy or obvious.. I am Googling as we speak also.. Cheers Matt
2006 Feb 20
3
Boxplot Help for Neophyte
R helpers I am getting to grips with R but came across a small problem today that I could not fix by myself. I have 3 text files, each with a single column of data. I read them in using: myData1<-scan("C:/Program Files/R/myData1.txt") myData2<-scan("C:/Program Files/R/myData2.txt") myData3<-scan("C:/Program Files/R/myData3.txt") I wanted to produce a
2008 Jun 20
2
how do I manage a Dell PE 860 server via IPMI?
Hi all I'm trying to get to grips with this one, but just can't figure it out. I recently acquired some 2nd hand Dell Poweredge 860 servers, and noticed that they have built in remote management interfaces. So, I have setup one, and assigned an IP address to it, but have no idea on how to access it remotely. Google'ing for an answer didn't bring me more than general product
2007 Aug 30
1
belongs_to with foreign keys that reference non primary key columns
Hello, I have a situation where the foreign key into a table doesn''t correspond to that table''s primary key: my_table ------------- id (pk) name ... other_table -------------- id (pk) my_table_name (fk references my_table(name)) ... I want to be able to say something like: class OtherTable < ActiveRecord::Base belongs_to :my_table, :foreign_key => { :my_table_name
2003 Mar 04
3
for loop problem
Hi, I'm just coming to grips with "for" looping etc. and have a bit of a problem: I want to generate a sequence which goes 1 2 3 4 5 6 7 8 14 15 16 17 18 19 20 21 26 27 ... i.e. 8 consecutive numbers then 5 missed then the next 8 numbers etc. I was going to do this using the seq() function but couldn't figure out how so I thought I'd try a loop: for (x in seq(1,650,13)) {
2008 Jun 02
7
Pretty HTML reporting for stories
Hi all, I''m just getting to grips with rspec, and I''m trying to put together a showy demo. We''re trying to use the (plain text) stories feature, rather than the specs. I''d like to show off a fancy HTML report of the results if possible. So it seems I can do this from the spec command line tool, but I can''t make it work for a story. I''ve got
2006 Aug 02
0
Composite Primary Keys support for Associations
Announcement: Composite Primary Keys gem now includes support for ActiveRecord Associations. Summary: Composite Primary Keys allows an ActiveRecord to support 2+ primary keys using the set_primary_keys class method. Previous versions provided full CRUD and find support. This latest release provides support for more ActiveRecord magic: associations (has_many, belongs_to, etc) Full report:
2006 Aug 14
0
Composite Primary Keys - now works with Rails 1.1.6
Due to the foolish implied assumption that there''d never be a revision to activerecord library, the Composite Primary Key code promptly broke for anyone who updated their apps to Rails 1.1.6 (with its activerecord-1.14.4) Now the gem dependencies are fixed and your legacy databases are free to wield composite primary keys without fear again. Description: Composite Primary Keys
2006 Jul 23
0
Composite Primary Keys 0.3.2
ActiveRecords with composite primary keys now seem to happily support find/create/update/destroy options. Url: http://compositekeys.rubyforge.org Background: Rails/ActiveRecords has long been critised for not supporting legacy databases, especially composite primary keys. This gem extends ARs with this support. Cheers Nic -- Posted via http://www.ruby-forum.com/.
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 Apr 06
1
Primary keys and migrations
I have a join table I''m creating with a migration as follows: create_table :read_global_messages, :id=>false do |t| t.column :user_id, :integer t.column :message_id, :integer end So far so good, however I want the primary key to be user_id and message_id. How do I do this? I tried the following, but that doesn''t work: add_index
2006 Mar 07
0
Active record and multiple primary keys
Hello, Just a quick question. Can active record be used on a table that has multiple primary keys? if so how... -- Posted via http://www.ruby-forum.com/.