search for: listrecv

Displaying 17 results from an estimated 17 matches for "listrecv".

2005 Nov 28
4
validates_format_of nil
I''ve noticed that validates_format_of will return invalid if the field is nil. Question 1) How should we declare a validation that will validate it with a regex if it is set, but, if the field is not set, just move on Question 2) Why is it done this way? The other validators are only invoked if the field is set . If you want to declare the field mandatory, you add a
2005 Dec 18
8
Log viewer for colorized logs
Is there a decent log viewer for colorized log files? less -r for me doesn''t work well, as it sometimes clears the screen. I''d like: * Either a console type less viewer which just removes the colors * Or, even better, a console one which handles the colors without clearing the screen * Or, best of all, a GUI viewer - maybe even with color I use both Windows and Linux.
2006 Jan 15
6
PROPOSAL: Validations as Mixin
It seems to me that Validations are quite useful for many objects, even ones having nothing to do with ActiveRecord. Common examples are Contact Us forms, multi-step forms, web service paramater validations, etc. I took a look at the source for Validations, and it seems that it is very independent from ActiveRecord. I caught only three depenedencies: 1. validates_numericy --> depends on
2005 Dec 14
0
Fwd: Logger bug in 0.14.3 ?
...> > > > ---------- Forwarded message ---------- > From: NAKAMURA, Hiroshi <nakahiro-FMf0BjczJVvqq2nvvmkE/A@public.gmane.org> > Date: Nov 14, 2005 5:46 AM > Subject: Re: Using logger > To: ruby-talk ML < ruby-talk-X+L+6nJQZ58h9ZMKESR00Q@public.gmane.org > > Cc: listrecv-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi, > > Ara.T.Howard wrote: > >> Hi. I''m trying to use Ruby''s built in logger to show messages with the > > >> severity and timestamp, but I...
2005 Dec 11
62
PROPOSAL: The list needs to fork (desperately).
I''d like to propsoe that the RubyOnRails mailing list forks into three lists. PROBLEM: * The list is getting swamped with traffic, making it hard to use and even harder to follow. * Many, many messages get lost, with no reply. * Due to the overwhelming traffic, it''s hard for beginners to get the help that they need, since their messages get lost in the shuffle, and
2006 Jan 15
0
How to Validate Inherintly?
Very often, I''d like to know if an object is .valid? inherently - that is, if it meets all the validations that are run on it by itself, but I don''t care if one of the fields is not unique. What''s the best way to determine this - that is, to run all the validations except the validates_uniquness ones? (A common use case is when importing data - it''s
2006 Jan 15
1
Best Idiom for form using multiple models
What''s the best idion when you need to present the user a single form, whose data is loaded into several models? Issues: * How to display the errors together * How do you handle one model being valid but not the other * How do you do validations if one model''s validity depends on the other (I guess transactions could be used to handle #2 and #3...) -- Posted via
2006 Jan 22
0
Using rails Generators for non-RoR
I realized that the rails command could be used very effectiely for non RoR apps, and, with a little tweaking, even nonRuby apps. Anyone give this a try? -- Posted via http://www.ruby-forum.com/.
2005 Dec 16
2
Using logger from rails cron jobs
Hi. I''m trying to use logger from a rails cron job. It works fine, but I''d like the standard ruby behavior of stamping each log with date and time. How do I do this? I''m trying: # Set up out logging require ''logger'' logger = Logger.new(STDERR) logger.level = Logger::INFO RAILS_DEFAULT_LOGGER = logger # Tell rails to log to our logger also The
2005 Dec 18
0
Testing ActionController::Streaming
Rails has a powerful ActionController::Streaming method, but it''s quite hard to set up unit tests for it. assert_equal ''BINARY DATA'', @response.body won''t work, as .body is a Proc. How can I test that the correct data is served? -- Posted via http://www.ruby-forum.com/.
2005 Dec 18
2
Helper Methods - Help!
How can I call a helper method standalone, that is, not within a controller or anything? For instance, let''s say I have a class - not a subclass of ActiveAnything - that wants to do url_for , or the like? The reason I am asking is that I want to create *UNIT* tests for my helper methods, but can''t get them to work. I can''t figure out how to invoke them outside of
2005 Dec 18
1
Timestamping Log messages in Rails
How can I tell Rails to use the default format for all of it''s logs - that is, with severity and a timestamp? Even better, is there a way I can add the IP, and maybe the session identifier, of the current request for all entries? (I''d like this even for models, to know which request the model calls belong to). Stuff like this is critical for following the log steam on a
2006 Feb 16
3
How to use Selenium from Rails
I caught two different approaches to integrate Selenium to Rails: http://svn.viney.net.nz/things/rails/plugins/selenium_testing/README http://andthennothing.net/archives/2006/02/05/selenium-on-rails It seems that the first makes it easy to right the tests, and the second makes it easy to run them. Am I correct? Any chance of the two hooking up and cross polinating? -- Posted via
2006 Jan 20
1
Time From String
Is there any Ruby / Rails way to take a string and convert it to time? timefstr Specificallc,y I''d like to convert iso 8601 fromats to Ruby Time objects or ActiveRecord time fields. -- Posted via http://www.ruby-forum.com/.
2006 Jan 17
1
Rails too Active?
I feel the need to protest about a disturbing trend in the vibrant RoR community - name dilution. ActiveRecord is called that precisely because it is that. The name come from Martin Fowler, and it expresses a class which is a database record, only _active_ - that is with methods & behaviors (unlike a classical database record, which is completely passive.) If you look in the
2005 Dec 11
7
Catching Exceptions in ActionController
I''d like to be able to catch ActionController::MissingTemplate exceptions from within ActionControlle, *but*, MissingTemplate isn''t defined within my controllers!!! How is that possible - after all, all controller subclass ActionController, so how are exceptions it defines not there!? More importantly, how can I do this? -- Posted via http://www.ruby-forum.com/.
2006 Jan 22
2
What are the benefits of RoR?
We''ve all seen the productivity benefits of RoR. It would be worthwhile to figure out where they come from. For me, I''d say the following: 1. The number one benefit isn''t from Rails per se, but from Ruby, or any other dynamic OO language (like Python). They avoid the weaknesses of loosely typed, procedural languages like Perl & PHP, but have the swiftness