similar to: One table with two keys to another table

Displaying 20 results from an estimated 10000 matches similar to: "One table with two keys to another table"

2006 May 24
2
Gallery2 integration
Is anybody working already in a gallery2/rails integration? I need to use it as part of my project, so, before start from scratch with it I''d like to know if already is something out there. Thanks.
2006 Feb 04
1
Specifying multiple foreign keys to another table?
Hi, By convention, if I have a field that is a reference to another record in the `users` table, all I would need to do is to name the column `user_id` and RoR would know it is a reference. However currently I am working on a table that records `actions` that both impact on another user, with each action performed by another user. Thus I''d have 2 columns like `impacted_user_id` and
2006 Feb 02
1
Two foreign keys to the same table
Hi, I''ve two tables: ProductLists (id, name, ...) Product (id,name,product_list_1_id, product_list_2_id, ...) How can I map the fields product_list_1_id and product_list_2_id to the ProductLists table in activerecord????? Thanks. -- Posted via http://www.ruby-forum.com/.
2005 Dec 27
6
Best Environment for development
This is a newb question, and probably one that is a matter of taste more than objective merit. I''m working on a home server, running Linux [FC 4], hosting a website [look for generocities.com shortly]. I have a delightful new Windows XP Pro Dell Inspiron 9300 laptop. What would the community recommend for the environment in which I develop? I don''t mean technologies like RoR
2006 Aug 10
1
reusing previous code
Hi, I have a couple of controllers, views, models and mailers for a given functionality (for example, user registration). ?what is the best way to share them between multiple applications so that I don''t have to copy them over and over again? Thanks.
2006 Mar 12
1
Problem with --partial and rsync algorithm
Hi, I'm running the following command for a remote host backup: /usr/local/bin/rsync -a --delete --delete-excluded -v --timeout=120 -z --no-whole-file -partial --partial-dir .rsync-partial --exclude=/sys/* --exclude=/tmp/* --exclude=/stuff/distfiles/* --exclude=/stuff/sistema/* --exclude=/stuff2/ftp/* --exclude=/stuff2/backup/* --exclude=/home/ftp/* --exclude=/home/gentoo/* --exclude=/mnt/*
2006 Jul 18
7
Observer not working
Help please. I''m trying to observe a User class, but I can''t get this to work, the after_create method never gets called... (the breakpoint never gets called) app/models/user_observer.rb: class UserObserver < ActiveRecord::Observer def after_create(user) breakpoint setting =
2006 Jun 23
5
create session only for logged-in
i was wondering how a blog db has grown by about 15 mb in a week or two. it turns out its the sessions table.. so ive tried this: class ApplicationController.. session :off end class AccountController session :only, :login end and now, its impossible to login, and nothing ever appears in the session table. is this the right approach? i dont want to weed out the sessions with cron, i just
2006 Jun 21
2
raw sql and columns order
Hi, I''ve a model with the following method: def self.run(sql) return connection.select_all(sql) end so, the value returned is an array of hashes... the problen is that the sql command: "select name, id from table" and select id,name from table" returns the columns in the same order (name, id). And in my view, I need to keep the order of the SQL command.
2006 Aug 02
7
String lenth limit
Hi, I''ve seen some time ago a function which, given a string like "this is a very long string" would return , for example limitin it to 10 chars "this is a..." , but I can''t remember where..... I''ve searched throwth the apis of rails and ruby itself and I can''t find it. Thanks everybody..
2006 Feb 07
4
Dynamic url with javascript? - Help Please
Hi, I''m trying to call a remote function when a combobox option is selected, passing as an argument the current value of the combobox (paramenter "panel_id": <select id="server_interface_jack_switch_panel"
2006 Apr 28
4
Existing Tabs Helper?
Hi. I''m going to start writting an ajax "tabs"" helper, but before starting to reinvent the wheel (and in order to avoid DRO : don''t Repeat Ourselves :-) ) I wish to know if there is any project for this already. Thanks.
2006 Feb 16
0
Help with foreign keys, two keys joining same table
Hey All Total nube here so please be gentle. My scenario is this: I have a table containing pages (named pages) I have a table with users (named users) In the pages table I want to have a user_id indicating the owner of the page from the users table. This was easy to accomplish with scaffolding and editing the actions etc. BUT I also want to have an editedby_id, which references another user
2006 Apr 06
4
using two foreign keys to the same table
i am working on a task manager with ruby on rails. it is my first major project, so i''m still gettng my feet wet as i learn. i''ve been trying to use the built in relationships to link my tables together, but i''m not able to use the same naming conventions. for each task, it has a field for the creator, and another field for the assignee. both of these fields
2006 May 30
1
Having two columns in a model point to another table
Hey, I''m kind of new to Rails, and would appreciate it if someone could point me in the right direction on this. I have a "users" table in my application, and I wanted to set up a "debts" table, to store debts between users. My current table structure for "debts" is CREATE TABLE debts ( id int not null auto_increment, owed_user_id int not null, # User
2006 Feb 28
1
Crazy excludes
I'm stuck!!! Look this command line log: -bash-2.05b# pwd /usr/backups -bash-2.05b# ls .backup.gaia.sh.swp backup.gaia.sh ------------------------------------------------------ #NEXT COMMAND IS ENTERED BY HAND IN THE SHELL ------------------------------------------------------- -bash-2.05b# rsync -a -v --delete --timeout 120 --exclude='/msurdi/*' localhost:/home/
2006 Jun 27
2
Using a different layout/styleshheet
Hi, I have a view that I use to display and capture data. Once the user has input the required data, I then need to be able to print the view. I know that I can setup a stylesheet to take care of the page layout but it is not clear to me how I will make the print view call the new layout. If anyone could clarify this or point met in the right direction, I would be most grateful. Regards, Paul
2006 Jun 02
5
Firefox extension for ajax debugging
or similar... Is there any extension for firefox so that I can view the source code of ajax returned content? Thanks everybody.
2007 Jan 08
3
Relating Tables
I have 2 mysql tables, Product and Color: Color ID ColorName 1 Red 2 Green 3 Yellow 4 Blue Products ID Color1 Color2 Color3 ProductName 1 ? ? ? Orco 2 ? ? ? Skeletor 3 ? ? ? He-Man I need to display the ColorName to
2006 May 12
1
ActionMailer without rails
Hi. Could someone post here a simple example of sending a mail throught a smtp server from ActionMailer but *outside* rails?? I mean, a simple script starting with: require ''rubygems'' require_gem ''actionmailer'' #stuff that sends some text by smtp I''ve been trying but I can''t get it to work. Thanks everybody.