similar to: Create method calling wrong column name in a table

Displaying 20 results from an estimated 7000 matches similar to: "Create method calling wrong column name in a table"

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
2009 Apr 24
1
RoR - getting started with database relations
Hey everyone... I''m just getting my feet wet with relational databases using RoR models. The software I''m putting together relies on car parts. Originally I had the database set up as follows create_table :parts do |t| t.column :year, :string t.column :make, :string t.column :model, :string . . . end However, I now realize it''s much better to do it using
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'',
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
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
2018 Oct 18
2
After updating to 16 "Some non-required modules failed to load"
I just noticed this upon startup since updating from 15.6.1 to 16.0.0 - do any of these matter? [Oct 18 12:12:18] WARNING[4489]: loader.c:2228 load_modules: Some non-required modules failed to load. [Oct 18 12:12:18] ERROR[4489]: loader.c:2243 load_modules: res_pjsip_transport_websocket declined to load. [Oct 18 12:12:18] ERROR[4489]: loader.c:2243 load_modules: cdr_sqlite3_custom declined to
2010 Feb 18
3
row indexes from logical statment
Is there any easy way to pull out the row indexes for a logical matching statment? #################example code######################################### foo <- data.frame(name=c(rep("A", 25), rep("B", 25), rep("C", 25), rep("A", 25)), stuff=rnorm(100), and=rnorm(100), things=rnorm(100)) #this is what I want but I would like the row indexes
2006 Jan 17
5
simple question
How do I pass parameters from one controller to another during redirect_to command? I want to pass both model and non-model objects. The solution I use is via session, but I rather pass it as parameters to the redirect_to Thanks. -- Posted via http://www.ruby-forum.com/.
2017 Aug 28
3
Extracting subset from netCDF file using lat/lon and converting into .csv in R
I have a series of nertCDF files containing global data for a particular variable, e.g. tmin/tmax/precipiation/windspeed/relative humuidity/radiation etc. I get the following information when using *nc_open* function in R: datafile: https://www.dropbox.com/s/xpo7zklcmtm3g5r/gfdl_preci.nc?dl=0 File gfdl_preci.nc (NC_FORMAT_NETCDF4_CLASSIC): 1 variables (excluding dimension variables):
2008 Jul 17
5
.build method
I have gone to the api and have searched the internet and looked through the books that I have, but I am having trouble finding an explanation on what the .build method actually does and how it is used. I guess the best example is if I want to create a todo list application where I can create a new todo list and add to do items all at the same time. I would post to the todolist controller to
2011 Apr 02
2
[patch] ~420 seconds in cpu_detect
playing with hdt on a soekris 4801, Im getting HUGE delays in cpu_detect. I added some timing code, heres what Im seeing ACPI: Detecting 0 mS in detect_acpi MEMORY: Detecting 0 mS in detect_memory DMI: Detecting Table DMI: ERROR ! Table not found ! DMI: Many hardware components will not be detected ! 55 mS in detect_dmi CPU: Detecting 0 mS in get_cpu_vendor 0 mS in "intel cpu
2011 Apr 02
2
[patch] ~420 seconds in cpu_detect
playing with hdt on a soekris 4801, Im getting HUGE delays in cpu_detect. I added some timing code, heres what Im seeing ACPI: Detecting 0 mS in detect_acpi MEMORY: Detecting 0 mS in detect_memory DMI: Detecting Table DMI: ERROR ! Table not found ! DMI: Many hardware components will not be detected ! 55 mS in detect_dmi CPU: Detecting 0 mS in get_cpu_vendor 0 mS in "intel cpu
2006 Jun 08
9
find :order =>
Hi, I have the following find statment @client_pages, @clients = paginate :clients, :per_page => 20, :order => "organisation_id, surname" currently im ordering by organisation_id however I need to order by the field in the organisation table organisations.name how can this be done? Thanks Scott -- Posted via http://www.ruby-forum.com/.
2006 Jul 05
2
get value from array.
hi, Im running the following sql statment which returns 1 result. pSql = "SELECT sum(amount) FROM payments WHERE expected_pay_date LIKE ''"+pWholeDate+"%'' AND invoice_id IS null " aResult = Payment.find_by_sql(pSql) how can I get the result of this? (when doing @aResult.inspect it
2008 Oct 21
2
[help] Realtime Swich any context dinamically
when i wnat to working with realtime and mysql for any context i have to insert (switch => Realtiem/context at extensions) statment into extensions.conf for example if i want to have 10 context, i have to insert these lines into extension.conf : [context1] switch => Realtiem/context1 at extensions [context2] switch => Realtiem/context2 at extensions [context3] switch =>
2010 Jun 28
2
Using if statement on function
Hello everybody, I'm trying to use a if-statment on a function. For a better understanding I want to present a small example: FUN=mean # could also be median,sd or any other function if (FUN == mean) plot(...) if (FUN == median) plot(...) ... This doesn't work, because FUN is a function. I've already tried to coerce the
2017 Aug 28
0
Extracting subset from netCDF file using lat/lon and converting into .csv in R
Two questions: 1. Is the order of the dimensions shown what is shown if you look at str(ncin) - I mean shown at the end where it describes the variable and its dimensions? 2. Is you problem how to subset the netcdf file, how to write to the .csv file, or both? -Roy > On Aug 28, 2017, at 2:21 PM, Eeusha Nafi <eshad002 at gmail.com> wrote: > > I have a series of nertCDF files
2003 Nov 18
2
Compiling R
I have a generally successful compiled R 1.8.0 version installed on a SuSE 9.0 system. One frustration however is that the basic keyboard functions of BASH have not completely carried through and the up, down, left and right arrow keys don't behave as they do on the regular shell command line. That is no command history can be accessed and the cursor cannot be back-spaced over a
2006 Nov 26
0
concatenate fields in collection_select
Hi, I am filling a collection_select with a list of models references based on a column named "model_ref". <%= collection_select(:assets, :model_id, @models, :id, :model_ref,:prompt => ''- Select a model -'') %></p> I have two issues : 1) I would like to concatenate another column next to the model reference inside the option value with the description
2006 Jan 30
3
Date Not Staying in Date Format
I have a column in a data frame that has a class of "Date" and a mode of "numeric". When I: max(df$Date) My output stays in Date format, i.e. "2006-01-03". However, when I run the following statment: tapply(df$Date, df$SomeFactor, max) my output looks like this: 9129 9493 9861 10226 10591 10956 11320 11687 12052 12417 The returned object is of