search for: dmorin

Displaying 20 results from an estimated 30 matches for "dmorin".

Did you mean: morin
2006 Jun 07
2
Making an HTTP request to an external machine
During one of my controller actions I want to call an external machine before I do anything. It''s not a real web service, more like a REST-style thing where I''ll just be tweaking a servlet running on another machine and sending it some data. Does Rails give me anything to work with for doing that? I read the web service stuff but it''s overkill for what I need. I
2006 Jun 09
4
View into a String?
I''ve got a nice XML view of my data that works just fine when I call it from the browser. Now I''d like a different controller method to take that XML and write it to the file system. Since the XML view lives in an RXML file, is there a trick to telling the controller "Get your output into a string" instead of writing it back to the browser? After writing it out
2006 Mar 14
2
Max retries exceeded to host...
The past two days, I've been having issues with my two VoIP service providers where calls just suddenly hang up. The following is from the log: Mar 14 13:50:55 WARNING[5887] chan_iax2.c: Max retries exceeded to host 64.34.45.100 on IAX2/voipjet-3 (type = 6, subclass = 11, ts=250000, seqno=80) Mar 14 13:50:55 DEBUG[10428] channel.c: Didn't get a frame from channel: IAX2/voipjet-3 Mar
2012 Feb 01
6
Does Devise make use of a "status" method? Weird bug.
...endering.rb:15:in `render'' vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.0/lib/action_controller/metal/instrumentation.rb:40:in `block (2 levels) in render'' vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.0/lib/active_support/core_ext/benchmark.rb:5:in `block in ms'' /Users/dmorin/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'' vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.0/lib/active_support/core_ext/benchmark.rb:5:in `ms'' vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.0/lib/action_controller/metal/instrumentation.rb:40:in `block i...
2006 Mar 17
1
Design / Pattern / Scaffold for has-and-belongs-to-many ?
Is there a standard practice for providing a UI into HBTM relationships? I have a model User, and a model Training, and I need to manage both relationships -- show me all the people that have training X, but also show me all trainings user U has. And, of course, "Lookup this user and then add/remove trainings for this person" or "Lookup this training and add/remove
2005 Dec 29
1
Best way to prune my list of returned rows?
Every example and tutorial I can find shows how to create and paginate a list of rows returned from a table. But I''m trying to write an interface on top of an existing table with 4million rows. So I need to jump right to the lesson on searching my data. That, I can''t find. Can somebody tell me the techniques available for pruning down my list a bit? I found a
2005 Mar 23
2
Does X100P clone provide Timer?
Does anyone know if the X100P clone cards provide the timer needed to run MOH and the Conferencing service? I have no need for a T1 card, but I'm running asterisk on a dual processor machine with the wrong kind of USB devices, so none of the dummy timers will work for me. Also, I'm running Asterisk@Home (2.4 Kernel). Anyone know if upgrade to the 2.6 kernel will allow me to use the
2006 Jun 15
1
Ok, I''m stumped on arrays of form fields
My Alert object has_many Links. I''ve got the whole system setup where, once I have the Alert object created, I can use a nice form_remote to show the user all the Links currently attached, and add more. But the form itself starts out with 0 links. What I''d like to do now is construct the form with a couple of default "Place link here" objects in the array, and
2006 Jun 07
2
Are the find_ methods strictly a SQL thing?
I''ve had a number of occasions now where I want to find something in my model that is not on the primary object. For instance I''ve got a class Alert that has_one Status. Status has a "label". I want to find all of my Alert objects and order the results alphabetically by status label. Can I do that without going into SQL? Right now I find myself doing an
2006 May 01
2
Getting my schema straightened out
I''m trying to map Rails to an existing schema, and having a bit of a time of it. I''ve got a table Content, and I''ve got a table Review, which is a type of content. So content has an ''id'' field, and Review has a ''contentid'' field. Not all Content has a Review, but all Reviews have exactly one Content. How do I represent this?
2006 Jan 03
4
Set the foreign key constraint column name?
I am applying Rails to an existing schema and not sure how much the existing developers will let me go in and rename things. So I need to discover the limits of what I can change with Rails. I''ve found set_table_name and set_primary_key, which have been very useful. If I have a "foo has_one :bar" relationship, but then in the bar table my column is named "fooid"
2006 Jun 02
3
Where are the best AJAX examples?
Googling for this has not solved my problems. Is there a particular site that is recommened for its examples and tutorials on Rails'' AJAX capabilities? I know exactly what I want to do, just not how to do it, and am looking for some code to pore over. 1) I have a dropdown that represents the name of an image in a library. When the dropdown value is changed, I would like to refresh
2004 Dec 09
6
Horrible MeetMe performance
Hey folks, Using FreeBSD 5.2.1 and I've got the current zaptel driver installed from ports (0.8_1) and current ports asterisk (1.0.1). I've set options HZ=1000 in my kernel config, recompiled and rebooted and as far as I can tell, I've done everything right but when I try to use the conference, the audio is very delayed, choppy and segmented -- totally unusable. At the
2006 Jun 02
2
What''s the model pattern for just storing an array of ints?
Maybe this question is obvious, but I''m missing the answer. I want one of the fields in my model to be an array of int. These are not indexes into another model. I''m cool with creating another database table if I have to, but then do I need to do a join to access the data? Or does Ruby have some cool trick where I can translate my array of ints into a String, store it in
2006 Jun 05
0
Escape sequences in html_options?
I hate asking questions like this, but I swear I''ve been looking for the answer for the better part of the morning. I want to execute some javascript onChange for a select box, so I have: :onchange=>"for (var x=1; x <= this.options.length; x++) {....}" The problem is that the <= is being translated into &lt;= and I don''t want that :-/. Nothing
2006 Jun 06
1
In memory ActiveRecord-alikes?
Say that I have such a small amount of data that I''m fine with just coding it directly into Ruby in a hash or something. But I still want to treat it like a model -- in particular, I have another object that has_one of these things. Can I do that? When my primary object loads, how to I tell it not to generate SQL to go find the secondary object, but just to use what the object
2006 Jun 07
3
Silly question re: scoping of controller actions
Say that there''s a piece of functionality I want to call everytime the controller is invoked, regardless of what action I am calling. Where do I put that, exactly? Can I do that? -- Posted via http://www.ruby-forum.com/.
2006 Jun 08
1
Is there an official CVS library? And, where would I put it
Two questions. First, I''m wondering if there''s a library already written that will enable Ruby to interface with CVS. I did find one (cvs.m17n.org/~akr/ruby-cvs/) but it''s unclear to me if that is still maintained. Some download links are broken and it seems to be at version 0.2. That''s why I ask if there''s an "official" one? Is that
2006 Jun 12
0
javascript form events (onsubmit) in RHTML
what''s the trick for adding an onSubmit hook when using the start_form_tag? I can''t seem to find anything. I''m assuming that I can do it, no? Thanks! -- Posted via http://www.ruby-forum.com/.
2006 Jun 13
1
Can I refresh a remotely updated section once?
My object has_many Link objects. So I''ve set up a form on my edit page that uses form_remote to accept a text field and then dynamically create and add a new Link object and remain on the same page. I have a div id="links" region that gets updated to show the current list of links. This works fine. But when I first load the page, if the object already had links, how do I