search for: emrec

Displaying 12 results from an estimated 12 matches for "emrec".

Did you mean: emre
2006 Oct 17
6
Session access interfers with other model access
Sorry to be such a bother but I''m not getting this. I have two models: Emrec and Session (I''m using AR for session mgmt.) In my worker I can access the Emrec model and delete a record, AS LONG AS I don''t try to access the Session model. With the Session model access commented out as below, the Emrec record gets deleted. If I uncomment those lines, t...
2007 Feb 20
1
error message for record not found ?
...included the worker code. Can anybody tell me how to verify that the worker is actually closing the connection and then creating suicide? Versus dying because of this failed find and not closing the connection correctly? Thanks, Bill ----------- log message ----------- Couldn''t find Emrec with ID=1 - (ActiveRecord::RecordNotFound) C:/InstantRails-1.3/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/base.rb:955:in `find_one'' C:/InstantRails-1.3/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/base.rb:941:in `find_from_ids'' C:/Instan...
2006 May 10
2
trouble creating new records
Is it possible to create / save a new record from a controller other than the one I specified when I created the scaffolding? My situation is that I have two tables. Emrecs is the parent. Actors is the child and has a foreign key named emrec_id that references emrec.id. I scaffolded both, creating controllers and views for each. My app collects info from the user to fill in the two tables, then writes the info collected out in an XML file. Now I need to read in t...
2006 Feb 28
19
Session magic question
Greetings! I could really use some help understanding what Rails puts into the session store related to the objects it creates. I''ve found documentation on how _I_ can put / get info into it, but can''t find the docs on what _Rails_ puts into it. I''ve got a simple app that collects some data from the user, stores it in a db record, allows the user to edit it, display
2006 Mar 05
2
Need help understanding Rails magic!
...ic records I wanted deleted. I thought the code I''ve got would delete *all* the records. Thanks in advance for any help you can give me. Best regards, Bill ------------------------ controller code ------------------------- class AllergyController < ApplicationController model :emrec model :allergy model :allergy_item def new @allergy_item = find_allergies end def update @allergy_item = find_allergies @emrec = find_emrec ###### # This is the code I don''t understand. My intention was to check the new params entry for each #...
2006 Sep 09
2
Server-side session management for short session expirations?
...ls. When the user explicitly logs out of my app, I delete all the data they''ve entered/that''s been created during their session. The data includes files, database records, and then their session data. The controller code that gets executed when they log out is: def cleanup emrec = find_emrec files = Tempfilerec.find(:all, :conditions => ["emrec_id = ?", emrec.id]) files.each {|file| #FileUtils.rm "#{RAILS_ROOT}/public/#{file.filename}" for production FileUtils.rm "public/#{file.filename}" } emrec.destr...
2006 Oct 16
6
accessing session data in worker
Is there something special I need to do to access session data in a worker? I''m using an AR session store. I''ve been working with Ezra''s tutorial, modifying it a little here and there to figure it out. So I changed the progress bar to a simple count-down in the worker which sends back the count to display in the view. No big deal. But if I try to access session
2006 Oct 17
2
accessing args in worker
If, in the controller, I start a worker and pass in an argument like this: session[:job_key] = MiddleMan.new_worker(:class => :foo_worker, :args => {:emrec_id => @emrec.id}) How do I access the value in the worker? I can''t seem to figure it out ;-p Thanks! Bill -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20061017/48549ab5/attachment.html
2006 Jun 09
8
[how can i delete a file system..please help]
Hi, I''m trying to delete a file system (<xml_26548975.xml>) File.delete("xml_26548975.xml") But I get this error: "Permission denied - ./script/../config/../uploads/xml_26548975.xml". Why? -- Cheers, ioana k&a http://boulangerie.wordpress.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL:
2006 Mar 09
3
Need help PLEASE!!! - updating collection from form
...te it if someone could help point me in the right direction. I''ve included the view and controller code below. Thanks in advance for any assistance! Bill --------------------- controller code ------------------------ def edit_illnesses # send a collection of records to the view @emrec = find_emrec @illnesses = Illness.find(:all, :conditions => ["emrec_id = ?", @emrec.id]) end def update_illness # update the records sent in ''edit_illnesses'' based on what''s returned in ''params''...
2006 Jul 26
7
syntax for specifying :html fallback on form_remote_tag
Has anyone gotten the :html option for specifying a ''fallback'' action if javascript''s not enabled working on form_remote_tag (or remote_form_for)? I can''t figure out how to specify the action that''s supposed to be invoked if js _is_ enabled. Or maybe I''m just misunderstanding how this thing is supposed to work. I was assuming
2006 Mar 11
2
assignment of parent ID in child''s fk field
When I create a child record I''m not automagically getting the parent ID put into the fk field. Does object.new take parameters that allows me to do that as part of the AR record creation? Or do I need to do it separately? Or am I missing the boat altogether ;-) Thanks, Bill -------------- next part -------------- An HTML attachment was scrubbed... URL: