[#104966] Why I don't use Ruby. — TLOlczyk <olczyk2002@...>
For a short period I used Ruby and found that I liked it very much,
"Sean O'Dell" <sean@celsoft.com> wrote in message news:<200407091430.02799.sean@celsoft.com>...
On Saturday 10 July 2004 11:57, Sean Russell wrote:
TLOlczyk <olczyk2002@yahoo.com> wrote in message news:<e2n7e058oliihrdldn41p3ocr5c3qtq6vs@4ax.com>...
James Britt <jamesUNDERBARb@neurogami.com> wrote in message news:<40E586A6.9040301@neurogami.com>...
ser@germane-software.com (Sean Russell) writes:
Mikael Brockman <phubuh@phubuh.org> wrote in message news:<87llhx2hec.fsf@phubuh.org>...
Sean Russell wrote:
James Britt wrote:
On Thursday 08 July 2004 12:48, Hal Fulton wrote:
Hal Fulton a 馗rit :
On Monday 12 July 2004 13:52, bruno modulix wrote:
Sean O'Dell a 馗rit :
On Tuesday 13 July 2004 13:02, bruno modulix wrote:
Sean O'Dell wrote:
On Tuesday 13 July 2004 14:37, Florian Gross wrote:
Sean O'Dell wrote:
On Tuesday 13 July 2004 15:22, Florian Gross wrote:
Sean O'Dell wrote:
On Tuesday 13 July 2004 16:12, Florian Gross wrote:
Mikael Brockman <phubuh@phubuh.org> wrote in message news:<87llhx2hec.fsf@phubuh.org>...
On Thursday 08 July 2004 11:52, Sean Russell wrote:
On Fri, 9 Jul 2004 05:03:10 +0900, Sean O'Dell <sean@celsoft.com> wrote:
On Thursday 08 July 2004 14:29, zuzu wrote:
On Fri, 9 Jul 2004 07:38:52 +0900, Sean O'Dell <sean@celsoft.com> wrote:
On Thursday 08 July 2004 16:41, zuzu wrote:
On Fri, 9 Jul 2004 10:16:17 +0900, Sean O'Dell <sean@celsoft.com> wrote:
"Sean O'Dell" <sean@celsoft.com> wrote in message news:<200407081308.50197.sean@celsoft.com>...
On Sat, 10 Jul 2004 05:07:30 +0900, Sean Russell
Mikael Brockman <phubuh@phubuh.org> wrote in message news:<874qoee9pl.fsf@phubuh.org>...
[#104998] SQLite-Ruby 1.2.0 — Jamis Buck <jgb3@...>
SQLite-Ruby is a module for accessing SQLite (http://www.sqlite.org)
[#105057] ruby-dev summary 23763-23840 — Minero Aoki <aamine@...>
Hi all,
On Fri, Jul 02, 2004 at 08:08:42PM +0900, Minero Aoki wrote:
[#105058] Exceptions list - Unix ENOENT not the name of the exception - what is? — Graham Nicholls <graham@...>
Austin Ziegler wrote:
[#105081] Help with one-liner — Philip Mateescu <pmateescu@...>
Hello,
On Sat, 2004-07-03 at 01:13 +0900, Philip Mateescu wrote:
You're probably right about the line ending, here's a variation:
[#105101] Re: How to detect if variable has been defined yet? — gabriele renzi <surrender_it@...1.vip.ukl.yahoo.com>
il Fri, 02 Jul 2004 17:40:40 GMT, Randy Lawrence <jm@zzzzzzzzzzzz.com>
[#105102] How to detect if variable has been defined yet? — Randy Lawrence <jm@...>
Hi,
[#105121] define_method to add a Class method? — walter@...
How do you use define_method (or an equivalent) to add a method to a
On Friday 02 July 2004 12:42, walter@mwsewall.com wrote:
On Friday 02 July 2004 13:02, walter@mwsewall.com wrote:
[#105126] Simple mod_ruby counter using global variable — Randy Lawrence <jm@...>
I'm guessing this is because each Apache process has its own Ruby
[#105127] Ruby 1.8.2 to be released on July 7? — Randy Lawrence <jm@...>
Is Ruby 1.8.2 going to be released on July 7? I heard a rumor that it
[#105133] irb — "Ara.T.Howard" <Ara.T.Howard@...>
[#105134] slow method searching? — David Garamond <lists@...6.isreserved.com>
$ time ruby -e'a=(1..200000).to_a; a.classx'
David Garamond <lists@zara.6.isreserved.com> writes:
[#105149] Windows installer — Harry Ohlsen <harryo@...>
I just noticed that, while there's an ri.bat in the ruby bin directory,
[#105186] SQLite/Ruby update pending — Jamis Buck <jgb3@...>
I'm getting ready to release a "release-candidate" of SQLite/Ruby 1.3.0.
il Sun, 4 Jul 2004 04:04:22 +0900, Jamis Buck <jgb3@email.byu.edu> ha
gabriele renzi wrote:
On Sunday, July 4, 2004, 11:01:02 PM, Jamis wrote:
Gavin Sinclair wrote:
[#105192] Best way to determine if running on windows or unix-based system — Carl Youngblood <carl.youngblood@...>
I'm going to try using Ruby/DL to write a full-fledged ruby extension
Hi,
[#105204] Problem with "eval" — Dirk Einecke <dirk.einecke@...>
Hi.
[#105215] Regular expression question — gm@... (George Moschovitis)
Hello everyone!
[#105234] Which version of Ruby is most widely used? — Randy Lawrence <jm@...>
What version of Ruby are most of us currenting using?
Hello Randy,
--- Lothar Scholz <mailinglists@scriptolutions.com> wrote:
[#105240] aeditor 1.0 released — Simon Strandgaard <neoneye@...>
screenshots:
-----BEGIN PGP SIGNED MESSAGE-----
On Monday 05 July 2004 16:40, Kaspar Schiess wrote:
On Monday 05 July 2004 02:13, Simon Strandgaard wrote:
-----BEGIN PGP SIGNED MESSAGE-----
[#105253] YAML questions/ideas — Hal Fulton <hal9000@...>
Hi, _why (and others who may wish to comment)...
[#105254] Transforming... — Meino Christian Cramer <Meino.Cramer@...>
Hi,
Meino wrote:
[#105269] Wiki spam — "Gavin Sinclair" <gsinclair@...>
Folks,
[#105281] Seperate body content from HTML — Matthew Margolis <mrmargolis@...>
I am currently working on a script that will parse lyrics on online
[#105307] Net::SSH 0.0.2 — Jamis Buck <jgb3@...>
Net::SSH is an implementation of the SSH2 protocol in Ruby.
Jamis Buck wrote:
Randy Lawrence wrote:
Jemis,
[#105314] Array::index and rindex operator — Hadmut Danisch <nospam@...>
Hi,
Robert Klemme wrote:
Hi --
ts <decoux@moulon.inra.fr> writes:
[#105317] How to encode binary for http.post() — Randy Lawrence <jm@...>
I'm having problems posting a binary string (around 256 characters)
[#105330] Ruby Advocacy/Documentation/Sponsorship? — Randy Lawrence <jm@...>
Having discovered Ruby recently and falling in love with it, I'm
Randy Lawrence wrote:
On Tue, 6 Jul 2004 15:14:01 +0900, you wrote:
[#105331] Re: Ruby Advocacy/Documentation/Sponsorship? — "dross@..." <dross@...>
I have been working on a CMS with ruby documentation, examples, and API. I
[#105344] CfC: Workshop on Revival of Dynamic Languages @ OOPSLA'04 — Roel Wuyts <roel.wuyts@...>
CALL FOR CONTRIBUTIONS
il Tue, 6 Jul 2004 09:58:06 +0200, Roel Wuyts <roel.wuyts@ulb.ac.be>
[#105347] YAML Error: stack level too deep — "E.-R. Bruecklmeier" <unet01@...>
Hi Rubyists,
[#105369] Windows - Socket - Connect - Nonblocking — "Jean-Francois Nadeau" <jean-francois.nadeau@...>
Hi,
[#105370] Ever dream about watching Maggie Simpson cum? — Nostrils <beforeshe@...>
Also, would you finger Marge Simpson until she fainted?!!?
[#105391] beginner question — Mikael Larsson <mikael.x.larsson@...2.se>
Hi all
[#105408] Bugtracking & UnitTests == good? — martinankerl at eml dot cc <asdf@...>
Hi all! I am afraid this post is a bit offtopic. If you are not
On Tuesday 06 July 2004 11:17, martinankerl at eml dot cc wrote:
Sean O'Dell wrote:
On Tuesday 06 July 2004 11:31, Jamis Buck wrote:
Sean O'Dell wrote:
[#105417] Secure Ruby Compiler — Randy Lawrence <jm@...>
One of the killer features lacking in most scripting languages is the
Randy,
Randy Lawrence wrote:
On Wed, 7 Jul 2004 17:32:46 +0900, you wrote:
On Sat, 10 Jul 2004 04:28:54 +0900, tony summerfelt
It's a choice. If you want to share your source, that is your decision.
On Sat, 10 Jul 2004 08:17:31 +0900, John Johnson <johnatl@mac.com> wrote:
On Sat, 10 Jul 2004 10:35:55 +0900, John Johnson <johnatl@mac.com> wrote:
> > > If not for discouraging 'casual copying', then are there
[#105437] Rubygems Wiki Spam — Charles Comstock <cc1@...>
Umm all of the rubygems wiki has been overwritten by spam from some
[#105444] Time to go vote ... — James Britt <jamesUNDERBARb@...>
for Ruby as your favorite programming language:
[#105454] Class#=== has interesting results — Charles Comstock <cc1@...>
Why does this happen?
--- Charles Comstock <cc1@cec.wustl.edu> wrote:
On Wed, Jul 07, 2004 at 04:22:36PM +0900, Charles Comstock wrote:
Mauricio Fern疣dez wrote:
Hi --
On Thu, 8 Jul 2004, David A. Black wrote:
Hi --
--- "David A. Black" <dblack@wobblini.net> wrote:
[#105478] Regexp exercise — "Olivier D." <nkh@..._tele2_AM.fr>
Hi,
[#105507] arguments to Thread#raise ? — Paul Brannan <pbrannan@...>
If I write:
>>>>> "P" == Paul Brannan <pbrannan@atdesk.com> writes:
[#105537] GEM /FXRuby problems — Meino Christian Cramer <Meino.Cramer@...>
Hi,
On Thu, 8 Jul 2004 08:56:56 +0900, Meino Christian Cramer
From: Lyle Johnson <lyle.johnson@gmail.com>
[#105539] open-uri: problem handling https? — Randy Lawrence <jm@...>
Hi,
In article <cC0Hc.33918$eH1.16184273@newssvr28.news.prodigy.com>,
[#105552] ruby-doc.org URL-based Documentation Queries not working? — CT <demerzel@...>
Hi all,
CT wrote:
James Britt wrote:
Dave Thomas wrote:
[#105560] ruby interpreter as mach kernel server (beside bsd) — zuzu <sean.zuzu@...>
ruby, starting the interactive ruby shell, but with filesystem access
[#105567] speeding ruby development — David Garamond <lists@...6.isreserved.com>
I personally would very much like Ruby development to be sped up. We
Hi,
il Thu, 8 Jul 2004 20:33:54 +0900, David Garamond
If you're going to do the work to support something (paying people to
David Garamond <lists@zara.6.isreserved.com> writes:
[#105587] Efficient way to do a simple Perl thing with Ruby — "Kirk Haines" <khaines@...>
I have some Perl code that does something like this:
[#105597] While we're discussing 'ri'... — Hal Fulton <hal9000@...>
I have a confession. 'ri' has never worked for me, and I have never
Hal Fulton wrote:
James Britt wrote:
[#105651] Anomoly using pattern to remove superfluous final \, if present — "Richard Lionheart" <NoOne@...>
Hi All,
[#105660] Secure Database Systems — "Sarah Tanembaum" <sarahtanembaum@...>
I was wondering if it is possible to create a secure database system
[#105681] I love Ruby — Graham Nicholls <graham@...>
I had to say it! I teach for LearningTree, so was able to attend a perl
On Fri, 9 Jul 2004 19:17:32 +0900, Graham Nicholls
[#105687] Ruby-Syntax capable editors for OS X? — Michael Fivis <michael.fivis@...>
Hello, fellow OS X Ruby fans. I was wondering if there was any nice
Michael,
I liked vim and ruby.vim was nice, but I like literally being able to
[#105702] bdb 0.5.0 problem with ruby 1.8 — Nikolai Krot <fake_address@...>
Hi
[#105707] StringIO#readbytes — Michael Neumann <mneumann@...>
Hi,
[#105729] weird behaviour — lopex <lopexx@...>
Hello
[#105735] PickAxe 2 licensing — Dave Thomas <dave@...>
Folks:
> Sam Stephenson wrote:
> open-sourced. This didn't happen. In fact, what seemed to happen is
Dave Thomas <dave@pragprog.com> wrote in message news:<DA50B6EA-D1B6-11D8-A508-000A95676A62@pragprog.com>...
On Sat, 10 Jul 2004 06:43:23 +0900, Dave Thomas <dave@pragprog.com> wrote:
On Saturday 10 July 2004 10:21, Dave Thomas wrote:
[#105754] : RubyGems 0.7.0 Released — Jim Weirich <jim@...>
Hello all,
il Sat, 10 Jul 2004 12:02:23 +0900, Gavin Sinclair
gabriele renzi wrote:
[#105755] ruby CVS system() bug? — Dick Davies <rasputnik@...>
[#105788] My impressions about Ruby — "Sam Sungshik Kong" <ssk@...>
This post is kinda long and a personal opinion which is not meant for
On Fri, 9 Jul 2004 23:02:02 +0200, Mauricio Fern疣dez
[#105813] Ruby Snapshot Notifier — Randy Lawrence <jm@...>
Has anyone already implemented a ruby script to check if a new ruby
[#105890] FXRuby 1.2.0 / Fox 1.2.6 — Meino Christian Cramer <Meino.Cramer@...>
Hi,
[#105903] OT: Am I readable ? — Meino Christian Cramer <Meino.Cramer@...>
Hi,
[#105942] Business application building with Ruby — Alexey Verkhovsky <alex@...>
I am contemplating a project, and I have a question:
On Sun, 11 Jul 2004 07:27:23 +0900, Alexey Verkhovsky wrote
Thanks for the responses.
Result of executing this code:
>>>>> "A" == Alexey Verkhovsky <alex@verk.info> writes:
Kirk Haines wrote:
[#105959] A little algorithmic help requested... — Hal Fulton <hal9000@...>
Here's a problem my tired brain is having trouble with.
[#105970] Hosting Ruby scripts/cgi (repost) — Keith P Hodges <keith_hodges@...>
All,
[#105996] Syntax question for gsub — Dirk Einecke <dirk.einecke@...>
Hi.
Dnia 2004-07-11 19:14, U杉tkownik Dirk Einecke napisaウ:
Hi.
[#106011] Net::SSH 0.0.3 — Jamis Buck <jgb3@...>
Net::SSH is a Ruby implementation of the SSH2 client protocol.
Hi,
il Tue, 13 Jul 2004 07:25:28 +0900, Jamis Buck <jgb3@email.byu.edu> ha
On Tuesday, July 13, 2004, 5:32:22 PM, gabriele wrote:
[#106021] const_missing — Elias Athanasopoulos <elathan@...>
Hello!
[#106022] SQLite-Ruby 1.3.0 — Jamis Buck <jgb3@...>
Looks like there were no problems found in the SQLite-Ruby release
From: Jamis Buck <jgb3@email.byu.edu>
Meino Christian Cramer wrote:
From: Jamis Buck <jgb3@email.byu.edu>
From: Meino Christian Cramer <Meino.Cramer@gmx.de>
[#106026] Re: Make A Fortune For Only $6 - MUST BE HONEST!!! — Jason Creighton <androflux@...>
On Sun, 11 Jul 2004 15:29:03 GMT,
[#106027] How to install eRuby on Mac OS X 10.3 — Jonas Hartmann <Mail@...>
Welcome list, I am new to this and to ruby :-)
The following worked for me:
Whuuu, there is modruby and eruby, what is the difference/their jobs?
[#106028] Ruby quickies and useful idioms — Sam Stephenson <sstephenson@...>
There's a few trivial but useful "extensions" to Ruby's standard
il Mon, 12 Jul 2004 07:55:58 +0900, Mikael Brockman
[#106052] Ruby Module Naming Convention vs Java Namespaces — Randy Lawrence <jm@...>
How do we manage namespaces in Ruby to avoid collisions with 3rd parties?
Hi --
On Monday 12 July 2004 08:28, David A. Black wrote:
On Tuesday, July 13, 2004, 1:28:40 AM, David wrote:
[#106089] tk/autoload not found — Wybo Dekker <wybo@...>
Hi,
[#106090] Gem & extconf.rb command line options — Andreas Schwarz <usenet@...>
Hello,
[#106102] ruby-dev summary 23841-23877 — "Takaaki Tateishi" <ttate@...>
Hello,
[#106127] problem with cerise & active_record & mysql on mac os x 10.3 — Caio Chassot <k@...2studio.com>
Hi all,
* Caio Chassot <k@v2studio.com> [0746 21:46]:
Dick Davies wrote:
[#106133] can't override a cgi function, please help — Cere Davis <cere@...>
This is soooo driving me crazy!
[#106136] Problems creating a method to define a class with its method — Benny <linux@...>
Dear list,
[#106144] make install not working under msys/mingw32 — Joel VanderWerf <vjoel@...>
I'm upgrading my mingw32 ruby from 1.8.1 to the latest 1.9.0 snapshot.
[#106150] RubyGems 0.7.0 - still "Alpha" status? — Randy Lawrence <jm@...>
Hi,
[#106163] win32api: how to access NetFileEnum results? — Jos Backus <jos@...>
I'm trying to programmatically determine any network opened files on a Windows
[#106169] gets — "News Groups" <ram_naga@...>
Hello All,
[#106215] Printing contents of a method — Nate Smith <nsmith5@...>
Hello all,
On Tue, 2004-07-13 at 14:24, Dave Thomas wrote:
On Wed, 14 Jul 2004, Dave Thomas wrote:
[#106217] Problem with extension on OS X — Andreas Schwarz <usenet@...>
Hello,
[#106227] qtruby compilation error — Jochen Immendfer <jochen.i@...>
Hi,
On Wed, Jul 14, 2004 at 01:40:23AM +0900, Jochen Immendfer wrote:
Thank you two for answering.
Ok, I did one more try. This time on my notebook -- same distribution like
On Wed, Jul 14, 2004 at 02:32:36AM +0900, Jochen Immend?rfer wrote:
irb(main):001:0> require 'Qt'
On Wed, Jul 14, 2004 at 03:29:33AM +0900, Jochen Immend?rfer wrote:
[#106294] String.split — Tom Danielsen <tom@...>
Tom Danielsen <tom@mnemonic.no> writes:
[#106309] instance variable question in test/unit TestCase — Nicholas Van Weerdenburg <nick@...>
Hi all,
Nicholas Van Weerdenburg wrote:
[#106325] Updating comp.lang.ruby FAQ... — Hal Fulton <hal9000@...>
I used to have an automated process for sending out the c.l.r FAQ,
[#106357] 'Initializing' modules — George Moschovitis <gm@...>
Hello everyone,
Hello!
[#106358] Re: qtruby and ms windows — "Jochen=20Immend=F6rfer" ?= <jochen.i@...>
Could it be, that qtruby requires qt-3.3.x?
[#106365] Split quoted text — Michael Weller <michael@...>
Hi!
[#106366] — Jesse van den Kieboom <troplosti@...>
Hi,
>>>>> "J" == Jesse van den Kieboom <troplosti@orcaweb.cjb.net> writes:
On Wed, 2004-07-14 at 14:41, ts wrote:
>>>>> "J" == Jesse van den Kieboom <troplosti@orcaweb.cjb.net> writes:
Okay, I understand the idea now. Problem is that I register two global
>>>>> "J" == Jesse van den Kieboom <troplosti@orcaweb.cjb.net> writes:
> The problem is not that you _can_ load the file, you *must* load it
>>>>> "J" == Jesse van den Kieboom <troplosti@orcaweb.cjb.net> writes:
> The loaded file need to call the register_functions, i.e. rather than
>>>>> "J" == Jesse van den Kieboom <troplosti@orcaweb.cjb.net> writes:
>>>>> "J" == Jesse van den Kieboom <troplosti@orcaweb.cjb.net> writes:
[#106384] RubyGarden Wiki needs some CSS help — Gavin Sinclair <gsinclair@...>
Is there a wiki maintainer listening?
[#106407] drb_fork — "Ara.T.Howard" <Ara.T.Howard@...>
[#106419] Ruby Goody :) — Meino Christian Cramer <Meino.Cramer@...>
Hi,
[#106441] Problems with soap4r's wsdl2ruby.rb — Ben Giddings <bg-rubytalk@...>
I decided to try some things with soap4r's wsdl2ruby.rb script, and
Hi,
NAKAMURA, Hiroshi wrote:
[#106445] Newbie: Pointers for Ruby compatible DBase engine — xdblade@... (Xeon)
Hi,
On Wed, 14 Jul 2004, Xeon wrote:
[#106449] still having problems with soap4R — "Ernie" <erne@...>
Installed Soap4r-1_5_2 no problem
[#106471] Free Ruby "Cookbook" (48.71% done) — Randy Lawrence <jm@...>
Anyone know if this is moving along or stalled?
"Gavin Sinclair" <gsinclair@soyabean.com.au> wrote in message news:<44441.129.94.6.30.1089874634.squirrel@webmail.imagineis.com>...
[#106479] when will coerce be called? — "Xiangyu Yang" <xiangyu.yang@...>
I want to treat "true" as 1 and "false" as 0. So I do:
Hi,
il 15 Jul 2004 01:38:06 -0700, "Xiangyu Yang"
[#106480] my ruby code won't go as fast as my perl code — "Dave Burt" <burtdav@...>
I realise I'm doing this a perlish way, but my question is, is it possible
[#106493] Writing games in Ruby? — winnocence@... (Innocence)
Hey
On Thu, 2004-07-15 at 04:47, Innocence wrote:
[#106500] problems with xslt4r — Ralf Mler <r_mueller@...>
Hi,
Ralf Mler wrote:
Am Donnerstag, 15. Juli 2004 14:55 schrieb Michael Neumann:
[#106512] Problem using Ruby as script language, which limits its distribution speed — "Christian Kaiser" <bchk@...>
I am (or was) a big fan of ruby (except some unexpected function names, but
[#106519] Hiding app.run in begin-rescue block: pros & cons? — "Richard Lionheart" <NoOne@...>
Hi All,
irb(main):001:0> s = "#{aaa}"
Hi,
On Sat, 2004-07-17 at 08:09, nobu.nokada@softhome.net wrote:
Hi,
On Sat, 2004-07-17 at 17:10, nobu.nokada@softhome.net wrote:
[#106530] scripting language (fwd) — "Ara.T.Howard" <Ara.T.Howard@...>
Ara.T.Howard wrote:
Ara.T.Howard wrote:
Isn't there source code for the oci oracle protocol out there? A lot
Carl Youngblood wrote:
On Friday, July 16, 2004, 5:25:47 AM, Jamis wrote:
[#106546] Anyone tried Arachno Ruby? — "Robert Oschler" <no_replies@..._email_address.invalid>
I'm considering taking a look at Arachno Ruby but I'd like to hear from some
I used it at the end of last year while it was in alpha and I liked where it
Hello Keith,
Saw this mentioned here, so I tried it out. Looks very need and the
On Sat, 17 Jul 2004 11:20:41 +0900, you wrote:
tony summerfelt wrote:
On Mon, 19 Jul 2004 07:09:41 +0900, you wrote:
On Monday, July 19, 2004, 8:40:03 AM, tony wrote:
[#106549] Stumped newbie... — esplair@... (flattree)
Here is what I'm trying to do. Simulate nodes with objects. The nodes
[#106567] Monitor network connections — dwerder@... (Dominik Werder)
Hi all!
[#106604] Do you want ":=" operator? — "Xiangyu Yang" <xiangyu.yang@...>
(I may start a new thread. )
>Right. But not all object states or values can be changed that way,
Hi,
[#106620] Fundamental question — Meino Christian Cramer <Meino.Cramer@...>
Hi,
Meino Christian Cramer wrote:
[#106642] Another little algoritmic help needed... — Meino Christian Cramer <Meino.Cramer@...>
Hi,
[#106668] Wo publishes Pickaxe II? — Michael Vondung <mvondung@...>
Might have missed a message, but has it it been mentioned who is going
[#106675] Dynamically replacing methods for efficiency — Hal Fulton <hal9000@...>
I have an idea here, but I'm afraid of crossing the line from
On Sat, 17 Jul 2004 05:21:17 +0900, Hal Fulton <hal9000@hypermetrics.com> wrote:
[#106730] rfind-1.0: search-on-typing for all your files — martin.ankerl@... (Martin Ankerl)
Hi all,
[#106735] : about class method — "Kurk Lord" <kurk_lord@...>
Hi all,
What's the meaning of () outside of being function parameter delimiters
[#106736] Ruby Way code for shuffling an array doesn't behave as expected — Alexey Verkhovsky <alex@...>
One example in The Ruby Way claims that in the following snippet second
Alexey Verkhovsky wrote:
On Sun, 2004-07-18 at 01:43, Mark Sparshatt wrote:
[#106780] Looking at a Class's source — Claus Spitzer <DocBoobenstein@...>
Is there a way to look at the source of a class? E.g.
[#106782] ruby idiom for parsing function arguments? — zuzu <sean.zuzu@...>
this may be a silly question, but can someone provide for me the ruby
zuzu wrote:
[#106784] Current method — Claus Spitzer <DocBoobenstein@...>
How could I know which method (if any) is currently being executed? E.g.
[#106819] Which compiled language is closest to Ruby? — Gully Foyle <nospam@...>
I am currently using C++ as my compiled language but fell in love with
For a fully object oriented compiled language you might want to take a
On Tue, 20 Jul 2004 19:02:22 +0900, you wrote:
[#106823] Ruby Specification — David Ross <drossruby@...>
Request. Can someone create a ruby specification? I
il Mon, 19 Jul 2004 15:38:31 +0900, David Ross <drossruby@yahoo.com>
Joel VanderWerf <vjoel@PATH.Berkeley.EDU> wrote in message news:<40FC2CD0.7090408@path.berkeley.edu>...
[#106837] Compiling Ruby code — Nospam <news.home.nl-1@...>
Hi,
Nospam wrote:
Michael Neumann wrote:
Hello Scott,
On Tuesday, July 20, 2004, 1:48:17 AM, David wrote:
Hi,
[#106852] Java ResourceBundle like class in Ruby — Edgardo Hames <ehames@...>
Hi, everybody. I wondered how would you write a ResourceBundle-like
[#106855] using rdoc to document dynamically-generated classes — Paul Brannan <pbrannan@...>
I have a number of classes that are dynamically generated at the time my
[#106860] DBUnit for Ruby? — djberg96@... (Daniel Berger)
Hi all,
[#106877] Ruby Course — Brian Schroeder <spam0504@...>
Hello Everybody,
[#106891] Ruby legalities & The Ruby Foundation — ptkwt@... (Phil Tomson)
There have been several posts recently about the legality of using Ruby in
[#106904] Simple Solution to Ruby Licensing Issues/Misunderstandings — Gully Foyle <nospam@...>
After hearing a lot of confusion abour ruby licensing, I decided to
[#106908] Onigurama — Harry Ohlsen <harryo@...>
I've just started reading "Mastering Regular Expressions" because, while
Harry Ohlsen wrote:
> HI Michael,
Am Donnerstag, 22. Juli 2004 10:22 schrieb Michael Mueller:
> The imho coolest thing of FreeBSD ist the strict
David Ross wrote:
[#106909] Ruby/Tk article on macdevcenter — ptkwt@... (Phil Tomson)
Hadn't seen this mentioned yet:
[#106929] Net::SSH difficulties — Hal Fulton <hal9000@...>
I just installed Net::SSH 0.0.3 and started to play with it.
[#106940] Re: Compiling Ruby code — "James, Roshan (Cognizant)" <JRoshan@...>
If it is a meaningful additions to this list, I'd like to say that thse
At Tue, 20 Jul 2004 18:50:43 +0900,
Ruben wrote:
[#106979] thread safe? — tony summerfelt <snowzone5@...>
i see that a number of modules are declared 'thread safe?'
tony summerfelt (snowzone5@hotmail.com) wrote:
I'd like to call a particular inherited method rather than the one in
[#106986] Please e-mail Google to help the Ruby Garden Wiki — "Robert Oschler" <no_replies@..._email_address.invalid>
Hello,
[#106988] VB(ish) replacement — Dave Boland <NOSPAMdboland9@...>
The other day I was asked if there is an open source replacement for VB6
Others have answered most of the other questions.
In article <87isci8kho.fsf@pobox.com>, John J. Lee <jjl@pobox.com> wrote:
[#107001] openssl not getting built — Hal Fulton <hal9000@...>
I'm building the July 20 snapshot on Fedora 1.
Hal Fulton wrote:
Jamis Buck wrote:
On Wed, 21 Jul 2004, Hal Fulton wrote:
Ara.T.Howard wrote:
Hal Fulton wrote:
[#107012] Copland 0.4.0 "Rodeo" — Jamis Buck <jgb3@...>
Copland is an "Inversion of Control" (IoC), or "Dependency Injection"
[#107027] Safe Ruby Environment — Michael Neumann <mneumann@...>
Hi,
il Wed, 21 Jul 2004 06:03:50 +0900, Michael Neumann
gabriele renzi wrote:
Michael Neumann wrote:
>>>>> "F" == Florian Gross <flgr@ccan.de> writes:
[#107029] Now a different Net:SSH error... — Hal Fulton <hal9000@...>
Thanks Jamis, Tom, Josh, Ara...
Hal Fulton wrote:
[#107051] sysread and buffered I/O — Hal Fulton <hal9000@...>
I've been playing with telnet (and ssh) and I've been
In article <40FE101D.90603@hypermetrics.com>,
Tanaka Akira wrote:
In article <40FE1A4C.9080403@hypermetrics.com>,
Tanaka Akira wrote:
In article <40FE1F86.6030005@hypermetrics.com>,
On Wednesday, July 21, 2004, 6:22:19 PM, Tanaka wrote:
In article <189-1205065002.20040721185353@soyabean.com.au>,
On Wed, 21 Jul 2004 18:56:01 +0900, Tanaka Akira <akr@m17n.org> wrote:
In article <opsbhnakfau5o8pp@233.dallas-20rh16rt.tx.dial-access.att.net>,
On Wed, 21 Jul 2004, Tanaka Akira wrote:
In article <Pine.LNX.4.60.0407210648370.13231@harp.ngdc.noaa.gov>,
On Thu, 22 Jul 2004, Tanaka Akira wrote:
In article <Pine.LNX.4.60.0407220742560.5080@harp.ngdc.noaa.gov>,
[#107068] Little query — Peter Hickman <peter@...>
Given that x is an Array how come I can do
[#107093] mod_ruby or fastcgi+ruby? — Gully Foyle <nospam@...>
What are the pros & cons of mod_ruby vs fastcgi+ruby? Ruby will most
On Wed, 21 Jul 2004 23:47:03 +0900, Gully Foyle wrote
[#107107] tempfile iterator? — tony summerfelt <snowzone5@...>
what's the easiest way to iterate through a Tempfile?
[#107118] Ruby Installer for Windows 1.8.2-14_RC5 (from Ruby 1.8.2 preview1) — "Curt Hibbs" <curt@...>
Today Matz released the official preview1 for Ruby 1.8.2. This release
On Thu, Jul 22, 2004 at 05:37:58AM +0900, Curt Hibbs wrote:
Zakaria wrote:
On Fri, Jul 23, 2004 at 09:59:57PM +0900, Dave Thomas wrote:
El mi駻coles 21 de julio, Curt Hibbs escribi鷓
David Espada wrote:
Hello Curt,
On Thu, 22 Jul 2004 21:54:00 +0900, Lothar Scholz
il Fri, 23 Jul 2004 01:08:21 +0900, Richard Kilmer
Lothar Scholz wrote:
Hello,
Javier Fontan wrote:
On Sat, Jul 24, 2004 at 10:48:15AM +0900, Curt Hibbs wrote:
This release candidate of the Ruby Installer for Windows
Ok, ok... I know I said no more releases until
Curt Hibbs wrote:
Hi,
nobu.nokada@softhome.net wrote:
[#107122] Referencing objects and program design — Stephan K舂per <Stephan.Kaemper@...>
Hi all,
[#107128] Re: substring by range parameter (bug?) — "D T" <email55555@...>
Correct to my previous conclusion.
On Thu, 22 Jul 2004, D T wrote:
Hi,
On Thu, 22 Jul 2004, Yukihiro Matsumoto wrote:
Hi,
In article <1090572876.683170.2693.nullmailer@picachu.netlab.jp>,
[#107151] Problem with ActiveRecord and Cerise — Caio Chassot <k@...2studio.com>
Hi all,
> After a period of time (few hours / a day), the site stops responding.
[#107156] Bug? String interpolation and continuations — Sam McCall <tunah.usenet@...>
The following gives me weird results:
Carlos <angus@quovadis.com.ar> wrote in message news:<20040722102042.GA1575@quovadis.com.ar>...
[#107224] Reading stderr, stdout and the exit status of a process — Alexey Verkhovsky <alex@...>
Problem: call an external process, wait till it finishes, get its stdout
On Fri, 23 Jul 2004, Alexey Verkhovsky wrote:
On Thu, 2004-07-22 at 23:02, Ara.T.Howard wrote:
On Fri, 23 Jul 2004, Alexey Verkhovsky wrote:
[#107246] "Name my HTML E-mail lib" contest — James Britt <jamesUNDERBARb@...>
I've written a library to generate multipart/alternative HTML E-mail
Use the MIME namespace, IMO. MIME::Mail, MIME::MultipartMail, or
[#107247] Strange warning-message — Sebastian Ruhs <RembrandtAkaDodger@...>
Hi!
[#107263] Re: Ruby rocks! HELP converting Ruby to C++? — "Mehr, Assaph (Assaph)" <assaph@...>
[#107278] Active Record 0.9.0: Thread safety, speed, naturalness — David Heinemeier Hansson <david@...>
What's new in Active Record 0.9.0?
I'm still new to ActiveRecord, so forgive me if this is obvious, but
On Tuesday, July 27, 2004, 8:59:26 PM, Carl wrote:
> I'm pretty confident that David would ensure ActiveRecord works just
This stuff should probably be documented better, since it is not very
Carl Youngblood wrote:
You're right. Sorry for being a non-contributing leech. As soon as I
The reason I say this is that it's the best way to document what users
> The reason I say this is that it's the best way to document what users
I'm still confused on what associations have responsibility for
> I'm still confused on what associations have responsibility for
[#107320] Is Ruby to Objective-C Source Translator Easier? — Gully Foyle <nospam@...>
Would it be easier to create a ruby to objective-c translator than it is
[#107327] Action Pack 0.7.5: On rails from request to response — David Heinemeier Hansson <david@...>
It's with great pleasure that I present to you the first public release
[#107347] Which editor has YAML Syntax Highlighting — Lothar Scholz <mailinglists@...>
Hello,
[#107352] The number of lines of a file? — polarpolar <polarpolar@...>
Hi, Ruby Fans :
[#107370] Rails 0.5.0: The end of vaporware! — David Heinemeier Hansson <david@...>
I致e been talking (and hyping) Rails for so long that it痴 all wierd to
David Heinemeier Hansson wrote:
> The 10 minute video is really impressive. But after browsing through
David Heinemeier Hansson wrote:
>>> The 10 minute video is really impressive. But after browsing through
David Heinemeier Hansson wrote:
I think a better solution if you wanted something like this would be
Carl Youngblood wrote:
> Well, here's a quick hack that anyone could do in their code to make
If you include ERB::Util then it includes html escape. Use it in your
[#107372] Parameterized tests with test/unit — Alexey Verkhovsky <alex@...>
Ruby is amazing... Try to do this in Java (it is possible, but not in so
On Jul 24, 2004, at 16:50, Alexey Verkhovsky wrote:
On Thu, 2004-07-29 at 02:20, Nathaniel Talbott wrote:
[#107374] Iteration in extensions — Fredrik Jagenheim <jagenheim@...>
I can't get this simple thing to work. My extension uses two
[#107387] rubyonrails and cgikit comparison — Gully Foyle <nospam@...>
There seems to be a lot of excitement about rubyonrails even before the
On Sun, 25 Jul 2004 19:53:55 +0900, Florian Weber wrote:
> I agree with you - there is no point in comparing framework via the
Gully Foyle wrote:
> The reason I said it seems cgikit better separates presentation and
Florian Weber wrote:
> I have to admit that in using cgikit I didn't experience the binding
> What I like about it is that it completely separates presentation from
David Heinemeier Hansson wrote:
> Wouldn't that result in a very long tag, and thus more difficult to
il Mon, 26 Jul 2004 03:48:30 +0900, Florian Weber
> He's saying that he does not want to have 'foo' referencing something
Florian Weber wrote:
Florian Weber wrote:
> Let me return the question: don't you think there a gain if the ruby
[#107388] Get the content of a file — Dirk Einecke <dirk.einecke@...>
Hi.
[#107423] WEBrick and Binary POST Data — Gianni Jacklone <gianni@...6ix.com>
Greetings Rubyists:
[#107434] Net::SSH 0.0.4 "Happy Birthday To Me" — Jamis Buck <jgb3@...>
Net::SSH is a pure Ruby implementation of the SSH2 client protocol.
[#107468] Re: PickAxe I — "Mehr, Assaph (Assaph)" <assaph@...>
[#107479] aop presentational items in Rails? — leon breedt <bitserf@...>
hi,
On Mon, 26 Jul 2004 17:26:26 +0900, Florian Weber
[#107486] code introspection — daniel@... (Daniel Cremer)
Hi,
[#107510] tk.update — karibou <me@...>
Please is anyone able to guide me to what I am missing ? tk update seems
[#107551] How to contact Ruby-conf staffs? — SASADA Koichi <ko1@...>
Hi.
On Jul 27, 2004, at 05:56, SASADA Koichi wrote:
[#107552] Can't get rails to work — Fredrik Jagenheim <jagenheim@...>
Just trying to do the simple examples seen in both the tutorial and video.
[#107555] Why's (Poignant) Guide to Ruby: Expansion Pak I: The Tiger's Vest (with a Basic Introduction to Irb) — why the lucky stiff <ruby-talk@...>
Yes, I've been taking forever. Well, what can I say? Answering threats
why the lucky stiff wrote:
Raphael Bauduin wrote:
Curt Hibbs wrote:
why the lucky stiff wrote:
Curt Hibbs wrote:
Florian Gross wrote:
Curt Hibbs wrote:
Henrik Horneber wrote:
il Wed, 28 Jul 2004 17:55:51 +0200, Florian Gross <flgr@ccan.de> ha
gabriele renzi wrote:
[#107563] Net::SSH::SFTP::Simple fails to get file — "hackerotaku" <hackerotaku@...>
greetings to all
[#107574] Anyone tried compiling Ruby with c++? — Asfand Yar Qazi <im_not_giving_it_here@..._hate_spam.com>
No, I didn't say "porting Ruby to C++", I said "compiling Ruby
[#107594] DBI: connecting 'local' database — Ralf Mler <r_mueller@...>
Hi,
Ralf Mler wrote:
Am Dienstag, 27. Juli 2004 16:12 schrieb Michael Neumann:
Ralf,
Am Dienstag, 27. Juli 2004 18:56 schrieb Lennon Day-Reynolds:
Am Mittwoch, 28. Juli 2004 08:43 schrieb Ralf Mler:
[#107609] Is this a bug in Time.local? — "Richard A. Ryan" <Richard.A.Ryan@...>
Hi,
[#107610] Rails sessions — Bauduin Raphael <rb@...>
Hi,
> I'm a cgikit user as everyone knows by now ;-) and I like the way how
[#107648] a question on diff modules — jm <jm@...>
A notice that there is a few diff modules of raa. Two questions,
On Wed, 28 Jul 2004 15:14:02 +0900, jm <jm@transact.com.au> wrote:
Okay, I know this has probably been rehashed hundreds of times, but I
[#107659] What does NASA use Ruby for? — Bil Kleb <Bil.Kleb@...>
(I sent this via comp.lang.ruby in June, but it didn't seem to
[#107666] mailing list? — tony summerfelt <snowzone5@...>
did something happen to the mailing list/. number of messages that
[#107703] Cool use of Ruby as extension language — Lennon Day-Reynolds <rcoder@...>
From Slashdot:
[#107715] Stupid ODBC! — Lennon Day-Reynolds <rcoder@...>
So, in response to David's call for contributions of adapters for
On Jul 28, 2004, at 18:04, Lennon Day-Reynolds wrote:
That's what I was afraid of. Maybe I can use the 'info' method on the
On Jul 28, 2004, at 18:38, Lennon Day-Reynolds wrote:
Well, that's closer, but it still isn't a totally general solution,
On Jul 28, 2004, at 19:31, Lennon Day-Reynolds wrote:
On Wednesday 28 July 2004 15:04, Lennon Day-Reynolds wrote:
Sean,
On Wednesday 28 July 2004 17:31, Lennon Day-Reynolds wrote:
Sean: I like the idea of a seperate component that handles nothing but
On Wednesday 28 July 2004 23:06, Lennon Day-Reynolds wrote:
On Fri, 30 Jul 2004, Sean O'Dell wrote:
On Thursday 29 July 2004 10:41, Ara.T.Howard wrote:
On Fri, 30 Jul 2004, Sean O'Dell wrote:
On Thursday 29 July 2004 12:51, Ara.T.Howard wrote:
Why not take the approach of using a autoid function if you have it
[#107740] Rails 0.5.5: Windows, WEBrick, lots! — David Heinemeier Hansson <david@...>
What's new in Rails 0.5.5?
David, when you said on IRC that this is going to take some time I
>> * Added webrick dispatcher: Try "ruby public/dispatch.servlet --help"
[#107761] Automatically setting attributes — "Mehr, Assaph (Assaph)" <assaph@...>
[#107766] Net::SSH 0.0.5 — Jamis Buck <jgb3@...>
Net::SSH 0.0.5 is now available! (Yes, this comes hard on the heels of
[#107775] IO issues: forking, select, and duplexing — Hal Fulton <hal9000@...>
Suppose I have a source and a sink of data. These are IO-like,
[#107790] ulimit alike in ruby? — Patrick Gundlach <clr3.10.randomuser@...>
Dear ruby-hackers,
| Dear ruby-hackers,
[#107792] class and case — "E.-R. Bruecklmeier" <unet01@...>
Hi,
[#107800] Access MS SQL data — Gene Leung <gene.leung@...>
Hi all,
On Jul 29, 2004, at 10:49, Gene Leung wrote:
Hi Nathaniel,
[#107832] C ext: GC claiming objects early — Tilman Sauerbeck <tilman@...>
Hi,
>>>>> "T" == Tilman Sauerbeck <tilman@code-monkey.de> writes:
ts <decoux@moulon.inra.fr> [2004-07-30 15:43]:
[#107838] Including other people's Ruby libs in your package — James Britt <jamesUNDERBARb@...>
I'm writing some code that depends on MIME::Types, and works better with
> I'm thinking now of putting the third-party Ruby files into a local
Aredridel wrote:
[#107850] ri-emacs — Kristof Bastiaensen <kristof@...>
[ANN] Ri for (X)Emacs 0.1
[#107867] defined? in ruby-1.9 — "Dmitry V. Sabanin" <sdmitry@...>
Hi,
Hi,
[#107870] Re: Including other people's Ruby libs in your package — "Mehr, Assaph (Assaph)" <assaph@...>
[#107906] Forward references? — Lloyd Zusman <ljz@...>
Is there a way to define forward references to functions? Due to my own
[#107916] AllInOneRuby — "Erik Veenstra" <pan@...>
I'm pleased to announce the birth of AllInOneRuby.
On Sat, 31 Jul 2004 09:16:57 +0900, James Britt wrote:
[#107935] Upcoming release of Ruwiki needs some testers... — Austin Ziegler <halostatue@...>
Hi, folks.
[#107983] natcmp.rb added to string class — Patrick May <patrick@...>
Hello,
[#107984] Free(real Free) GUI toolkits — David Ross <drossruby@...>
Has anyone tried using the WideStudio libraries with
David Ross wrote:
> I haven't tried this (or even heard of it before),
Hello David,
> I hate myself for asking this question:
Oh a correction, by binary, I meant statically linked
Hmm.. does anyone have a MacOSX computer they can try
Hello David,
"Truth is important, knock down the trolls on thier
David Ross wrote:
I think you've got a poor understanding of the (L)GPL, buddy. You can
Hello David,
David Ross wrote:
>> And i must say i don't understand your attitude,
Hello David,
>
It's amazing to see how much one bad apple can spoil the barrel.
> It's amazing to see how much one bad apple can spoil
On Tuesday 10 August 2004 12:58, David Ross wrote:
David Ross wrote:
That's good to hear. I've only been on the mailing list for 90 days, so
In article <410CAD5B.8030405@illuzionz.org>,
Reinder Verlinde wrote:
Hello Rando,
[ANN] Action Pack 0.7.5: On rails from request to response
It's with great pleasure that I present to you the first public release
of
Action Pack. I've been working on the framework for close to a year
now, so
it's a great relief to finally feel ready to share with the world.
Alongside
Active Record, this almost completes the release of the technology used
to build
Basecamp[1] -- a highly succesful and acclaimed web-application from
the design
masters at 37signals.
Action Pack is a control-flow and template package for developing
MVC-style
web-applications. With Action Pack, you have the answer for the
Controler and
the View and is free to pick anything for the Model. If you were to
pick Active
Record, though, you'll enjoy a number of benefits from Action Pack,
such as
tailored view helpers and benchmarking integration.
Download and learn more at:
http://actionpack.rubyonrails.org (website, wiki)
http://actionpack.rubyonrails.org (api, detailed documentation)
P.S.: Tomorrow I'll release the first complete Rails package, which in
addition
to Action Pack and Active Record includes a ton of wiring to make it
extremely
easy to get started and follow best practices from day one.
[1] http://www.basecamphq.com/
/ David Heinemeier Hansson
How does Action Pack work?
==========================
Action Pack splits the response to a web request into a controller part
(performing the logic) and a view part (rendering a template). This
two-step
approach is known as an action, which will normally create, read,
update, or
delete (CRUD for short) some sort of model part (often backed by a
database)
before choosing either to render a template or redirecting to another
action.
Action Pack implements these actions as public methods on Action
Controllers
and uses Action Views to implement the template rendering. Action
Controllers
are then responsible for handling all the actions relating to a certain
part
of an application. This grouping usually consists of actions for lists
and for
CRUDs revolving around a single (or a few) model objects. So
ContactController
would be responsible for listing contacts, creating, deleting, and
updating
contacts. A WeblogController could be responsible for both posts and
comments.
Action View templates are written using embedded Ruby in tags mingled
in with
the HTML. To avoid cluttering the templates with code, a bunch of helper
classes provide common behavior for forms, dates, and strings. And it's
easy
to add specific helpers to keep the separation as the application
evolves.
Note: Some of the features, such as scaffolding and form building, are
tied to
ActiveRecord[http://activerecord.rubyonrails.org] (an object-relational
mapping package), but that doesn't mean that Action Pack depends on
Active
Record. Action Pack is an independent package that can be used with any
sort
of backend (Instiki[http://www.instiki.org], which is based on an older
version
of Action Pack, uses Madeleine for example). Read more about the role
Action
Pack can play when used together with Active Record on
http://www.rubyonrails.org.
A short rundown of the major features
=====================================
* Actions grouped in controller as methods instead of separate command
objects
and can therefore helper share methods.
BlogController < ActionController::Base
def display
@customer = find_customer
end
def update
@customer = find_customer
@customer.attributes = @params["customer"]
@customer.save ?
redirect_to(:action => "display") :
render("customer/edit")
end
private
def find_customer() Customer.find(@params["id"]) end
end
Learn more in link:classes/ActionController/Base.html
* Embedded Ruby for templates (no new "easy" template language)
<% for post in @posts %>
Title: <%= post.title %>
<% end %>
All post titles: <%= @post.collect{ |p| p.title }.join ", " %>
<% unless @person.is_client? %>
Not for clients to see...
<% end %>
Learn more in link:classes/ActionView.html
* Filters for pre and post processing of the response (as methods,
procs, and classes)
class WeblogController < ActionController::Base
before_filter :authenticate, :cache, :audit
after_filter proc{|c| c.response.body =
GZip::compress(c.response.body)}
after_filter LocalizeFilter
def list
# Before this action is run, the user will be authenticated,
the cache
# will be examined to see if a valid copy of the results already
# exist, and the action will be logged for auditing.
# After this action has run, the output will first be localized
then
# compressed to minimize bandwith usage
end
private
def authenticate
# Implement the filter will full access to both request and
response
end
end
Learn more in link:classes/ActionController/Filters/ClassMethods.html
* Helpers for forms, dates, action links, and text
<%= text_field "post", "title", "size" => 30 %>
<%= html_date_select(Date.today) %>
<%= link_to "New post", :controller => "post", :action => "new" %>
<%= truncate(post.title, 25) %>
Learn more in link:classes/ActionView/Helpers.html
* Layout sharing for template reuse (think simple version of Struts
Tiles[http://jakarta.apache.org/struts/userGuide/dev_tiles.html])
class WeblogController < ActionController::Base
layout "weblog_layout"
def hello_world
end
end
Layout file (called weblog_layout):
<html><body><%= @content_for_layout %></body></html>
Template for hello_world action:
<h1>Hello world</h1>
Result of running hello_world action:
<html><body><h1>Hello world</h1></body></html>
Learn more in link:classes/ActionController/Layout.html
* Advanced redirection that makes pretty urls easy
RewriteRule ^/library/books/([A-Z]+)([0-9]+)/([-_a-zA-Z0-9]+)$ \
/books_controller.cgi?action=$3&type=$1&code=$2 [QSA] [L]
Accessing /library/books/ISBN/0743536703/show calls
BooksController#show
From that URL, you can rewrite the redirect in a number of ways:
redirect_to(:action => "edit") =>
/library/books/ISBN/0743536703/edit
redirect_to(:path_params => { "type" => "XTC", "code" => "12354345"
}) =>
/library/books/XTC/12354345/show
redirect_to(:controller_prefix => "admin", :controller =>
"accounts") =>
/admin/accounts/
Learn more in link:classes/ActionController/Base.html
* Easy testing of both controller and template result through
TestRequest/Response
class LoginControllerTest < Test::Unit::TestCase
def setup
@request = ActionController::TestRequest.new
@request.host = "http://somewhere"
end
def test_succesful_authentication
@request.action = "authenticate"
@request.request_parameters["user_name"] = "david"
@request.request_parameters["password"] = "secret"
response = LoginController.process_test(@request)
assert_equal(
"http://somewhere/clients/", response.headers["location"])
assert_equal Person.find(1), response.session["person"]
assert(response.body.split("\n").include?(
"<h1>You've been logged in!</h1>"))
end
end
Learn more in link:classes/ActionController/TestRequest.html
* Automated benchmarking and integrated logging
Processing WeblogController#index (for 127.0.0.1 at Fri May 28
00:41:55)
Parameters: {"action"=>"index", "controller"=>"weblog"}
Rendering weblog/index (200 OK)
Completed in 0.029281 (34 reqs/sec)
If Active Record is used as the model, you'll have the database
debugging
as well:
Processing WeblogController#create (for 127.0.0.1 at Sat Jun 19
14:04:23)
Params: {"controller"=>"weblog", "action"=>"create",
"post"=>{"title"=>"this is good"} }
SQL (0.000627) INSERT INTO posts (title) VALUES('this is good')
Redirected to http://test/weblog/display/5
Completed in 0.221764 (4 reqs/sec) | DB: 0.059920 (27%)
You specify a logger through a class method, such as:
ActionController::Base.logger = Logger.new("Application Log")
ActionController::Base.logger = Log4r::Logger.new("Application Log")
* Powerful debugging mechanism for local requests
All exceptions raised on actions performed on the request of a
local user
will be presented with a tailored debugging screen that includes
exception
message, stack trace, request parameters, session contents, and the
half-finished response.
Learn more in link:classes/ActionController/Rescue.html
* Scaffolding for Action Record model objects
require 'account' # must be an Active Record class
class AccountController < AccountController::Base
scaffolding :account
end
The AccountController now has the full CRUD range of actions and
default
templates: list, show, destroy, new, create, edit, update
Learn more in
link:classes/ActionController/Scaffolding/ClassMethods.html
* Form building for Active Record model objects
The post object has a title (varchar), content (text), and
written_on (date)
<%= form "post" %>
...will generate something like (the selects will have more options
of
course):
<form action="create" method="POST">
<p>
<b>Title:</b><br/>
<input type="text" name="post[title]" value="<%= @post.title
%>" />
</p>
<p>
<b>Content:</b><br/>
<textarea name="post[content]"><%= @post.title %></textarea>
</p>
<p>
<b>Written on:</b><br/>
<select name='post[written_on(3i)]'><option>18</option></select>
<select name='post[written_on(2i)]'><option
value='7'>July</option></select>
<select
name='post[written_on(1i)]'><option>2004</option></select>
</p>
<input type="submit" value="Create">
</form>
This form generates a @params["post"] array that can be used
directly in a save action:
class WeblogController < ActionController::Base
def save
post = Post.create(@params["post"])
redirect_to :action => "display", :path_params => { "id" =>
post.id }
end
end
Learn more in link:classes/ActionView/Helpers/ActiveRecordHelper.html
* Automated mapping of URLs to controller/action pairs through Apache's
mod_rewrite
Requesting /blog/display/5 will call BlogController#display and
make 5 available as an instance variable through @params["id"]
* Runs on top of CGI, FCGI, and mod_ruby
See the address_book_controller example for all three forms