search for: michaux

Displaying 20 results from an estimated 137 matches for "michaux".

2006 Jan 19
7
validates_numericality_of positive integer
Hi, What is the simplest way to validate a positive integer? validates_numericality_of :foo, :integer_only => true how do I add the positive part? Do I need another validation statement for pattern matching or do I have to write a validate() funciton for my model? Thanks, Peter
2006 Jun 29
4
new idea for dragdrop library
...9;'t found a drag and drop library flexible enough for my needs and I think I have come up with something that is generally worthwhile. I use the DOM and Event utilities from Yahoo! UI and no Prototype.js. I''m interested in any ideas or suggestions people might have. Blog http://peter.michaux.ca/articles/2006/06/16/donut-dragdrop Examples http://peter.michaux.ca/examples/donut-dragdrop/donut-dragdrop.html http://peter.michaux.ca/examples/donut-dragdrop/scrollable.html http://peter.michaux.ca/examples/donut-dragdrop/slider.html Initial docs http://peter.michaux.ca/examples/donut-dragdr...
2006 Jan 26
8
switching to edge rails
Hi, I want to start using has_many :through. I think that eventually I''ll be removing all uses has_and_belongs_to_many from my project. Here is my situation I''m using SVN I want to use edge rails Reading the wiki about switching to edge rails[1], I can''t figure out which combination of subsections I must perform. Do I want edge rails to reside in the vendor
2006 Jan 30
5
url for image in css
Hi, I''d like to call a background image for every item in a list. Something like div#nav li.submenu {background: url(dropmenu.gif) 95% 50% no-repeat;} the image is in public/images/dropmenu.gif Thanks, Peter
2006 Apr 26
10
save new model with child model
Hi, I am having a problem saving a new model that has an associated child model. If a new ticket is being created and will have one comment to go with it then I tried this in my action @ticket = Ticket.new(params[:ticket]) @comment = Comment.new(params[:comment]) @ticket.comments << @comment if @ticket.save @notice = "Ticket added. Thanks for
2006 Mar 22
14
currency conversion webservice in a rails app?
Hi, I''m interested in using a currency conversion web service in my rails app. Does anyone have a free service that they use and like? I found this one http://www.webservicex.net/WS/WSDetails.aspx?CATID=2&WSID=10 I''ve tried to make a simple, plain Ruby script to connect to this and get a conversion rate without success. How do I integrate a webservice into my rails app? I
2006 Jul 07
5
Can a route require POST or GET? / REST problem with routing
Hi, A store front a customer wants to GET /product/5/show. But for the application this is really GET /cart_item/new/5 or even better /cart_item/new?cart_item[product_id]=5 When the customer clicks add_to_cart they POST /product/5/show so that the url doesn''t confuse the user when any validation errors occur. But for the applicaiton this should be POST
2006 May 27
7
OT Mexican domains?
Hola! In case there are some mexican readers here... It is little difficult for an english speaker to find information about mexican domains. Is it possible to register a domain like "fiesta.mx"? I have seen sites selling ".com.mx" and similar but not just ".mx". Thanks, Peter
2006 Jan 15
4
file_field vs. file_field_tag
Hi, The documentation doesn''t make it clear why both file_field and file_field_tag are both useful. What is the reason for having two instead of just one of these? Thanks, Peter
2006 Apr 26
3
catch all error for incorrect urls etc
Hi, I am changing a very standard old school website to rails. When I make the change to rails, all of the old urls will not be valid. If a person has a bookmark to an old web page I would like them to be directed to the front page of the new website www.domain.com. How do I do this? Do I do something in routes.rb? Thanks, Peter
2006 Apr 01
4
problems getting ActionMailer working (on server)
...mes. Seems pretty straight forward. Unfortunately I can''t get my application to actually send mail. I uploaded my application to the web server and tried to get a mail message sent. Nothing happened. I looked in the log file and it says Sent mail: From: service@freedomkilts.com To: petermichaux@gmail.com Bcc: petermichaux@gmail.com Subject: Freedom Kilts Order Confirmation Content-Type: text/plain; charset=utf-8 and I don''t see any errors. Does this mean that the rails app was happy and able to connect to the mail server? In my configuration.rb file I have (where password is ac...
2006 Jan 23
4
an image that is a clickable link?
Hi, How do I make an image that is a clickable link the rails way? Is there a view helper for this? Thanks, Peter
2006 Aug 22
0
Re: Multi-select and drag and drop
Hi Peter, is your patch against script.aculo.us mentioned in [1] gone any further in the last 3 months? -- alberto [1] http://dev.rubyonrails.org/ticket/2585 On 22/ago/06, at 00:35, Peter Michaux wrote: > > On 8/21/06, Bill Lazar <blazar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >> Before pounding my head on this particular rock I want to ask if >> anyone has done, or come across an article or code on how to do, the >> following. >> >&g...
2006 Feb 09
2
_marker in dragdrop.js
Hi, I''ve been confused about the purpose of _marker in dragdrop.js for quite a while. It doesn''t really look like it does anything with ghosting on or off. I removed the mark method and didn''t discover any problems. Is all the mark business a relic from some past idea? Thanks, Peter
2006 Mar 08
12
favorite FTP client of railers
Hi, Which FTP client would fit in nicely with OS X and Textmate. Thanks, Peter
2006 Jan 08
4
Redirect to where I was
I wonder if there is a standard Rails way to redirect from an action back to a previously viewed page. As a quick fix I created two little methods in the controllers/application.rb. Does this seem like an ok way to go? Thanks, Peter class ApplicationController < ActionController::Base def i_was_here session[:i_was_here] = request.env[''REQUEST_URI''] end def
2006 Jul 22
5
Prototype error. replace content inside a <TR> in IE
Does anyone know of a fix for the issue with prototype and replacing table rows in IE? render :update do |page| page.replace "row_#{params[:id]}", :partial => ''wireless_request/wrequest'', :locals => {:wrequest => @wrequest} end This ends up making IE throw an "rjs error [object error]" Searching around I found a couple of posts about
2006 Feb 18
44
I forgot. Why do we hate* Java?
Hi, I''ve started reading some Java books. Gasp! What makes website development with Java so bad? I haven''t looked at Struts but I''m reading about Hibernate. Compared to ActiveRecord, Hibernate seems like some extra typing to explicitly define the model fields, getters and setters. I know that these are things that you can do in ActiveRecord when things get complicated
2006 Jul 21
10
why validation on server side
hi, i have noticed that the validations in RoR happen at server side mostly what sites do is using javascript they validate user information there... whats the point of doing it at the server side is it that loading of javascript file in a browser makes a response to client slow and validation at server side offsets that....????? any sugeestions???? is it that i am missing something as
2006 May 19
12
How to build a server
Hi, I''ve been learning about building Rails apps for about 8 months but I don''t really know how servers work or how to build a server. I have an old 450 GHz Pentium computer I can play with. Since I use OS X, I was thinking about installing a BSD system and trying to make a MySQL/Rails server. That is about all I know about servers. How does a server in my house get connected