similar to: Nubee Fixtures + Tests problem

Displaying 20 results from an estimated 90 matches similar to: "Nubee Fixtures + Tests problem"

2006 Mar 27
2
Form Validation with 2 models on form. Nubee Question
I have one form in which i enter Person data and Employee Data. A Person and Employee model are used. I am using a legacy schema, so this is forced. How do i use save the data while using rails form validation?? I only want both models to save if they both save. Controller : This odviously doesnt work: def create_employee_and_person employee = Employee.new(params[:employee]) person =
2006 May 09
3
"ActiveRecord::Base.connection.execute" nubee problem
Is there any way of executing a full sql script, and not just one statement? You can do this: ActiveRecord::Base.connection.execute("insert into batches (name) values ''name''") but not this: ActiveRecord::Base.connection.execute("insert into batches (name) values ''name''; "insert into batches (name) values
2006 Apr 04
4
Cannot upgrade rails to 1.1, only 1.0. Nubee. Please help
I''ve used putty to SSH in to our solaris system as root: Here is what happens when i try to install rails: # gem install rails -include-dependencies -p http://saiproxy:3128 Attempting local installation of ''rails'' Local gem file not found: rails*.gem Attempting remote installation of ''rails'' Successfully installed rails-1.0.0 So my question is why
2006 Apr 27
6
Functional Test Problem. Nubee, please help
ALl my controllers require the user to be logged in. SO they will be redirected to my "login" controller. How do i login first in a functional test? Im assuming i use the setup method to login the controller. This is the setup method for the Activities controller functional test: def setup @controller = ActivitiesController.new @request =
2006 Mar 16
10
Nubee Callbacks problem
I never want to alter a model(row). When a model has been changed i want a new copy to be created. What is the best way to implement this? I think using callbacks might be the answer. So model.save will create a new row, and leave the old one unchanged. Any ideas? I can easily implement this in the controller but i''d rather it be done transparently. Also errors should be passed back
2006 Jun 01
5
RAD RAILS Problem. Wont start! Linux nubee
Hi I''ve just installed SUSE linux, downloaded RADRAILS, and extracted it to /home/myname/bin/radrails. When i try to run it i get the red radrails logo and then it gives me an error and stops loading. Its my first day using Linux, previously i have used windows, so any help is greately appreciated. Here is the log file with the errors in it : chrisr@s213:~> cat
2006 Mar 28
2
Fastest way of adding " " around multiline text in RADRAILS
lets say i have the following SQL in my database editor : When i paste it into rad rails i have to add quotes and the ''+'' symbol to the end of each line. It is very tedious. What is the best method? select timesheets.employee, sum(items.hours) as hours, sum(items.hours*timesheets.cost) as cost, sum(items.hours*timesheets.charge*decode(activities.chargetype,0,1,0)) as charge,
2006 Aug 04
5
query across tables
I am trying to do things the proper rails way and use the auto generated id to refernce other tables. Now I''ve hit a wall in trying to write a query. timesheets: id, employee_id, code_id, ... values codes: id, job_number, code How can I show just the timesheets that belong to a specific job? I would need to check the codes table and look at the jobs, so I was thinking of something
2013 Mar 30
1
How to use group in nested associations
The below query fails: Timesheet.joins(:time_entries).select("timesheets.*, sum(time_entries.worktime) as total").group("timesheets.start_date") The models have the following relations: Timesheet < AR has_many :activities, dependent: :destroy, inverse_of: :timesheet has_many :time_entries, through: :activities accepts_nested_attributes_for :activities,
2006 May 08
10
Apache 2.2, ProxyPass and HTTPS
Hi all, I''m currently trying to get Mongrel running my app whilst fronted by apache 2.2 in a sub-directory via https. A bit convoluted I''ll grant you but necessitated by existing systems. The pertinent parts of my httpd.conf: <VirtualHost 123.123.123.123:12345> #historic choice of random port number DocumentRoot /var/www/admin ServerName admin.example.com:12345
2005 Oct 17
4
How to send excel file to browser (spreadsheat 0.3.2)
hey, i want to generate an excel file and send it directly to the browser (without storing it to the harddisk). does anyone has any solution? thanks in advance this is my code: -------------------- def export_excel if @request.env[''HTTP_USER_AGENT''] =~ /msie/i @headers[''Pragma''] = '''' @headers[''Cache-Control''] =
2006 May 10
2
Output Compression in Mongrel?
I''d like to implement output compression in Mongrel (ala Apache''s mod_deflate). I have found a Rails plugin that, with minor modification, works. Is there even an advantage to moving the output compression from the Rails app to a Mongrel handler? Unless, of course, someone knows how to configure mod_proxy_balancer with mod_deflate... == Will Green Web Developer & IT
2006 Jul 12
6
Showing rows on a page
This is my first rails program and I?m having trouble figuring out how to show rows on the page when there may not be rows in the database. There are 3 tables, employees, cost_codes and timesheet, I will simplify them when describing them later on. When an employee logs in, I would like to pull up their timesheet, which should consist of one row per cost code. So timesheet would look a
2006 Mar 01
1
Eager loading problem. Help greately appreciated
Each Timesheet has an employee. An employee has a division and a location. I want to find all the timesheets with a status of 2. I then iterate over the timesheet collection and print the timesheet name, employee name, employee divison name, and employee location name. Like so: for t in Timesheet.find(:all,:conditions=>"status=2",:include=>:employee) puts timesheet.date
2010 Jan 15
5
wine iexplore white screen of death
On a fresh Ubuntu, sudo apt-get install wine wine iexplore yields a white screen of death with a title bar for Wine. I tried winecfg and tweaking settings, and I can get a desktop with IE WSOD again, so no real progress. The shell outputs a ton of errors/debug info, pasted below... What have I done wrong? wine iexplore fixme:ole:CoResumeClassObjects stub fixme:shdocvw:go_home stub
2006 Jan 19
2
select vs. select_tag
I have a "Users" object and a "Timesheets" object. Each timesheet entry belongs to a User, which is selected from a drop-down list. The timesheet has a user_id field. (The user needs to have an option to select a different user due to the way our system works.) If i use the "select" object, which is bound to the Timesheet model, using this code: &lt;%= select
2006 Jan 27
2
DB & AR advise please (diagram inc)
Hi, Being new to Rails and Active record could someone please check my database diagram: http://spectrais.com//images/0.png I am building a trouble ticket system for my company. Simply put a client has many users. Those users can create trouble tickets. Each trouble ticket can have many journals that track the progress of the ticket. An employee (of our company) can take ownership of a
2020 May 07
4
ot: copy physical mail files ?
> Am 07.05.2020 um 17:15 schrieb Admin dishaw.org <admin at dishaw.org>: > > > >> On May 6, 2020, at 9:45 PM, Voytek Eymont <voytek at sbt.net.au> wrote: >> >> dumb question warning: >> >> I have two email accounts, me at tld1 and me at tld2 >> often, get emails intended (by me) for me at tld2 sent to me at tld1 >> >>
2017 Apr 05
2
Servicios en la nube
Buenas, me gustarĂ­a saber su experiencia sobre servicios en la nube. Se que hay varios que usan los servicios de MS Azure. Tengo una duda respecto a eso, funciona como una maquina virtual, no? Lo que significa que para correr procesos debo estar conectado a la maquina, o puedo dejar corriendo procesos en segundo plano y volver luego para ver el resultado. Saludos y muchas gracias! --
2008 Jul 11
2
Horribly Nube ?
You gotta start somewhere I figure. I am enjoying wine 1.1.0 and have used it on and off mostly off for several years. Now I am getting serious and I haven't figured out the documentaiton. I got some bad advice from old docs which discouraged me. Anyway, where does one put the "native" dll's from one's windows installation? I know how to use winecfg to activate them and