similar to: RoR - getting started with database relations

Displaying 20 results from an estimated 300 matches similar to: "RoR - getting started with database relations"

2006 Mar 22
3
Parent-Child Tables Help
can someone help me with this i have a table cars ( id int model_id int make_id int color_id int description text constraint fk_cars_carmake foreign key(make_id) references carmakes(id), constraint fk_cars_carmodel foreign key(model_id) references carmodels(id), constraint fk_cars_color foreign key(color_id) references colors(id) ) carmakes ( id int carmake varchar ) carmodels ( id
2012 Mar 12
1
Faceted bar plot shows wrong counts (ggplot2)
I have encountered a problem with faceted bar plots. I have tried to create something like the example explained in the ggplot2 book (see pp. 126-128): library(ggplot2) mpg4 <- subset(mpg, manufacturer %in% c("audi", "volkswagen", "jeep")) mpg4$manufacturer <- as.character(mpg4$manufacturer) mpg4$model <- as.character(mpg4$model) base <-
2006 Apr 12
0
fixtures advanced question
Hello, in my database i have tables models,marques,cars. I wrote fixtures for models f1: id: 1 marque_id: 1 name: 100 NX f2: id: 2 marque_id: 1 name: 200 SX f3: id: 3 marque_id: 1 name: Almera f4: id: 4 marque_id: 1 name: Patrol f5: id: 5 marque_id: 1 name: Primera f6: id: 6 marque_id: 2 name: CLK f7: id: 7 marque_id: 2 name: CLS f8: id: 8 marque_id:
2009 Dec 06
3
virtual domains and SSL certificates
Hi, This topic has been discussed before e.g: <QUOTE> On 2008-08-07, at 1143, Kacper Wysocki wrote: The problem is that the configuration file specifies only one certificate file for dovecot, which means only one Common Name, which means one cannot provide one server cert that will match mail.foo.com AND mail.bar.com, and either ma... at foo.com or bo... at bar.com will get a
2006 Apr 24
4
Joined search returns NIL ids
I have two models: assets and makes. Make has many assets and an asset belongs to one make. I am calling this part of my asset controller from a search form with the parameters "search" (search term) and "field" (database field heading) which then renders a partial with the search results on it. ######################################################## if
2011 Aug 11
1
help with loops
hi I need help with list object. I have a list object > a <- c('apple','orange','grape') > b <- c('car','truck','jeep') > c <- list(a,b) > names(c) <- c('fruit','vehicle') > c $fruit [1] "apple" "orange" "grape" $vehicle [1] "car" "truck"
2019 May 20
1
WISH: Built-in R session-specific universally unique identifier (UUID)
# Proposal Provide a built-in mechanism for obtaining an identifier for the current R session, e.g. > Sys.info()[["session_uuid"]] [1] "4258db4d-d4fb-46b3-a214-8c762b99a443" The identifier should be "unique" in the sense that the probability for two R sessions(*) having the same identifier should be extremely small. There's no need for reproducibility, i.e.
2006 Mar 06
5
Question about file_column plugin
Hi! File_column plugin saves uploaded files to "public/model/image/model_id/filename", if i understand it correctly. Does it mean that it creates new folder for every image? I have product (model) that has_many images (model). Is it possible to use (or modify) this plugin that it would save my images to different folder, so the id of the model_id part would be id of the product
2008 Mar 11
2
Replacing text
Sorry, another newbie question :-( I loaded a data set with 10 rows and 30 columns. The first column is characters for names of car manufacturers: Jeep Nissan Toyota1 Toyota2 Etc. How can I replace "Toyota2" with "Scion"? Thanks again [[alternative HTML version deleted]]
2006 Mar 01
0
link_to problem when used in folder
I have split my appliction into 2 folders - public and restricted areas: "site" and "admin" Now, in "site" i have a "search" controller with the "results" action. I want to make a link that will keep all the parameters of the link <%= link_to ''link'', params %> However, instead of something like:
2008 Jul 22
2
ActiveRecord Associations issue
Hello all and thank you for reading this message. I am new to RoR, and ruby too, but i am quite excited about it. I am developing a RoR project and with active record associations in the following manner # Tables (all tables have only one record) CREATE TABLE `webcars_development`.`cars` ( `id` int(11) NOT NULL auto_increment, `model_id` int(11) NOT NULL default ''0'',
2007 Sep 19
3
Create method calling wrong column name in a table
I have a multitable database with an observer logging changes into a datachange table. The create method inserts the data into the data change table, updates my model, and then trys to load from the datachange table. When it does this it WHERE clause that is generated for me is looking for a column model_id which I dont have. I don''t want to even have a field because this table will be
2006 Nov 29
5
Collection_select with two columns and a prompt
Hello, I am quite a newbie to RoR, I hope you maybe able to help. I have a collection_select in a _form.rhtml: "collection_select(:assets, :model_id, @models, :id, :model_ref,options={:prompt => ''- Select a model -''})" As you see my drop down menu will show the model_ref column. 1) Is it possible to have more than one column. For example I would like to
2008 Feb 01
2
Speex memory usage?
Jean-Marc Valin skrev: > Ghost Wolf a ?crit : >> Hello Mailing List, >> I am a Speex supporter and user that would really like to know how much >> memory Speex uses to decode a 8kHz, 16kHz and 32kHz (primarily the 8kHz) >> and is it possible to use a 1kBytes of RAM to decode a 8kHz stream? (I >> was thinking of the possibility of using a ATmega168 to decode Speex)
2009 Sep 28
6
What is the most efficient way to split a table into 2 groups?
I have the following: @lot = Lot.find(params[:id]) part_nums = Part.all(:conditions => ["id <> ?", @lot.part.id]) I guess I should mention that Lot :belongs_to => :part I was looking at the log following the execution of these two statements and I saw something like this: Lot Load (0.4ms) SELECT * FROM "lots" WHERE ("lots"."id" = 13) Part
2008 May 09
2
K-Means Clustering
Hello, I am hoping you can help me with a question concerning kmeans clustering in R. I am working with the following data-set (abbreviated): BMW Ford Infiniti Jeep Lexus Chrysler Mercedes Saab Porsche Volvo [1,] 6 8 2 8 4 5 4 4 7 7 [2,] 8 7 4 6 4 1 6 7 8 5 [3,] 8 2 4
2012 Jun 05
1
INBOX help needed, dovecot + squirrelmail
Im trying to figure out how to get dovecot to deliver to my mail_location (example: /opt/imapdata/j/jeff/INBOX/inbox) AND work with squirrelmail. Ive worked on this for hours reading the docs etc with no luck so far. I get dovecot-lda to deliver to: /opt/imapdata/j/jeff/INBOX/inbox but when I use squirrelmail, I see the following in the log: dovecot: imap(jeff): Debug: Effective uid=1006,
2012 Apr 28
2
help with AES_DECRYPT and password lookup - mysql password_query
Hello- Sorry if this is a noob question, but I cant seem to get my password_query to work with dovecot + mysql. Im using 'Password verification by SQL server' at: http://wiki2.dovecot.org/AuthDatabase/SQL trying to modify it to work with my encrypted passwords in the DB. Im using the following which isnt working: password_query = SELECT NULL AS password, \ 'Y' as
2012 Dec 06
4
imap-login - where does the user get filled in from?
Sorry to ask such a basic question, but I finally got some major hurdles working for imaps on port 993 and Im getting the following when I try to connect from my iphone: imap-login: Disconnected (no auth attempts in 60 secs): user=<>, rip=192.168.1.1, lip=192.168.1.22, TLS handshaking: Disconnected Im using SQL and SSL over 993. I cant seem to find where my user comes from that its blank?
2005 Dec 16
4
Validation with Aggregation
ActiveRecord supports composed_of for value objects which is fantastic but one thing that it doesn''t seem to support (or at least I am unable to find any documentation for) validation of the value objects. For example, given the following: class Message < ActiveRecord::Base composed_of :sender, :class_name => ''EmailAddress'' composed_of :recipient,