[ANN] Rails 0.7.0, Action Pack 0.8.5, Active Record 0.9.5

I gather that most people are now familar with the RoR suite, so I'm 
skipping the formal introductions and will just bring you the meat.

Get it all from http://www.rubyonrails.org, talk it up on #rubyonrails 
(FreeNet).

Or even easier, just do "gem install rails" (or "gem update" if you're 
already running on Gem Rails) -- you'll automatically install all the 
newest versions of the required dependencies.

Rails 0.7.0: Fixed WEBrick, new_model generator, easier fixtures
================================================================

The WEBrick dispatch has been cured of its static file illnesses, 
there�s a new_model generator that handles camel case models 
gracefully, and fixtures are easier than ever to create. Also a few 
other minor fixes and of course the inclusion of AP 0.8.5 and AR 0.9.5.

* Added an optional second argument to the new_model script that allows 
the programmer to specify the table name, which will used to generate a 
custom table_name method in the model and will also be used in the 
creation of fixtures. [Kevin Radloff]

* script/new_model now turns AccountHolder into account_holder instead 
of accountholder [Kevin Radloff]

* Fixed the faulty handleing of static files with WEBrick [Andreas 
Schwarz]

* Unified function_test_helper and unit_test_helper into test_helper

* Fixed bug with the automated production => test database dropping on 
PostgreSQL [dhawkins]

* create_fixtures in both the functional and unit test helper now turns 
off the log during fixture generation and can generate more than one 
fixture at a time. Which makes it possible for assignments like:

     @people, @projects, @project_access, @companies, @accounts =
       create_fixtures "people", "projects", "project_access", 
"companies", "accounts"

* Upgraded to Action Pack 0.8.5 (locally-scoped variables, partials, 
advanced send_file)

* Upgraded to Active Record 0.9.5 (better table_name guessing, cloning, 
find_all_in_collection)


Action Pack 0.8.5: Local template variables, partials, better send_file
=======================================================================

Another major upgrade that adds the ability to pass locally-scoped 
variables between templates, use the brand new partials approach to 
simplify iteration over many objects with their own template, and a 
much improved send_file method. This release also includes a bunch of 
smaller tweaks and fixes.

* Introduced passing of locally scoped variables between templates:

     You can pass local variables to sub templates by using a hash of 
with the variable
     names as keys and the objects as values:

       <%= render "shared/header", { "headline" => "Welcome", "person" 
=> person } %>

     These can now be accessed in shared/header with:

       Headline: <%= headline %>
       First name: <%= person.first_name %>

* Introduced the concept of partials as a certain type of sub templates:

     There's also a convenience method for rendering sub templates 
within the current
     controller that depends on a single object (we call this kind of 
sub templates for
     partials). It relies on the fact that partials should follow the 
naming convention
     of being prefixed with an underscore -- as to separate them from 
regular templates
     that could be rendered on their own. In the template for 
Advertiser#buy, we could have:

       <% for ad in @advertisements %>
         <%= render_partial "ad", ad %>
       <% end %>

     This would render "advertiser/_ad.rhtml" and pass the local 
variable +ad+
     for the template to display.

     == Rendering a collection of partials

     The example of partial use describes a familar pattern where a 
template needs
     to iterate over a array and render a sub template for each of the 
elements.
     This pattern has been implemented as a single method that accepts 
an array and
     renders a partial by the same name of as the elements contained 
within. So the
     three-lined example in "Using partials" can be rewritten with a 
single line:

       <%= render_collection_of_partials "ad", @advertisements %>

     So this will render "advertiser/_ad.rhtml" and pass the local 
variable +ad+ for
     the template to display.

* Improved send_file by allowing a wide range of options to be applied 
[Jeremy Kemper]:

     Sends the file by streaming it 4096 bytes at a time. This way the
     whole file doesn't need to be read into memory at once.  This makes
     it feasible to send even large files.

     Be careful to sanitize the path parameter if it coming from a web
     page.  send_file(@params['path'] allows a malicious user to
     download any file on your server.

     Options:
     * <tt>:filename</tt> - specifies the filename the browser will see.
       Defaults to File.basename(path).
     * <tt>:type</tt> - specifies an HTTP content type.
       Defaults to 'application/octet-stream'.
     * <tt>:disposition</tt> - specifies whether the file will be shown 
inline or downloaded.
       Valid values are 'inline' and 'attachment' (default).
     * <tt>:buffer_size</tt> - specifies size (in bytes) of the buffer 
used to stream
       the file.  Defaults to 4096.

     The default Content-Type and Content-Disposition headers are
     set to download arbitrary binary files in as many browsers as
     possible.  IE versions 4, 5, 5.5, and 6 are all known to have
     a variety of quirks (especially when downloading over SSL).

     Simple download:
       send_file '/path/to.zip'

     Show a JPEG in browser:
       send_file '/path/to.jpeg', :type => 'image/jpeg', :disposition => 
'inline'

     Read about the other Content-* HTTP headers if you'd like to
     provide the user with more information (such as 
Content-Description).
     http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11

     Also be aware that the document may be cached by proxies and 
browsers.
     The Pragma and Cache-Control headers declare how the file may be 
cached
     by intermediaries.  They default to require clients to validate with
     the server before releasing cached responses.  See
     http://www.mnot.net/cache_docs/ for an overview of web caching and
     http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9
     for the Cache-Control header spec.

* Added pluralize method to the TextHelper that makes it easy to get 
strings like "1 message", "3 messages"

* Added proper escaping for the rescues [Andreas Schwartz]

* Added proper escaping for the option and collection tags [Andreas 
Schwartz]

* Fixed NaN errors on benchmarking [Jim Weirich]

* Fixed query string parsing for URLs that use the escaped versions of 
& or ; as part of a key or value

* Fixed bug with custom Content-Type headers being in addition to 
rather than instead of the default header. (This bug didn't matter with 
neither CGI or mod_ruby, but FCGI exploded on it) [With help from Ara 
T. Howard]


Active Record 0.9.5: Better table_names, cloning, find_all_in_collection
========================================================================

The table name guessing just got a brain upgrade that enables it to 
guess correctly in far more cases than the old once: Child will look 
for children, Wife for wives, and more. It�s now also possible to clone 
an Active Record safely and we�ve added another method to the has_many 
macro for finding within the collection. Lots of smaller fixes as well.

* Expanded the table_name guessing rules immensely [Florian Green]. 
Documentation:

     Guesses the table name (in forced lower-case) based on the name of 
the class in the inheritance hierarchy descending directly from 
ActiveRecord. So if the hierarchy looks like: Reply < Message < 
ActiveRecord, then Message is used to guess the table name from even 
when called on Reply. The guessing rules are as follows:

     * Class name ends in "x", "ch" or "ss": "es" is appended,
       so a Search class becomes a searches table.
     * Class name ends in "y" preceded by a consonant or "qu": The "y" 
is replaced with "ies",
       so a Category class becomes a categories table.
     * Class name ends in "fe": The "fe" is replaced with "ves",
       so a Wife class becomes a wives table.
     * Class name ends in "lf" or "rf": The "f" is replaced with "ves",
       so a Half class becomes a halves table.
     * Class name ends in "person": The "person" is replaced with 
"people",
       so a Salesperson class becomes a salespeople table.
     * Class name ends in "man": The "man" is replaced with "men",
       so a Spokesman class becomes a spokesmen table.
     * Class name ends in "sis": The "i" is replaced with an "e",
       so a Basis class becomes a bases table.
     * Class name ends in "tum" or "ium": The "um" is replaced with an 
"a",
       so a Datum class becomes a data table.
     * Class name ends in "child": The "child" is replaced with 
"children",
       so a NodeChild class becomes a node_children table.
     * Class name ends in an "s": No additional characters are added or 
removed.
     * Class name doesn't end in "s": An "s" is appended,
       so a Comment class becomes a comments table.
     * Class name with word compositions: Compositions are underscored,
       so CreditCard class becomes a credit_cards table.

     Additionally, the class-level table_name_prefix is prepended to the 
table_name and the table_name_suffix is appended.
     So if you have "myapp_" as a prefix, the table name guess for an 
Account class becomes "myapp_accounts".

     You can also overwrite this class method to allow for unguessable 
links, such as a Mouse class with a link to a "mice" table. Example:

       class Mouse < ActiveRecord::Base
          def self.table_name() "mice" end
       end

   This conversion is now done through an external class called 
Inflector residing in lib/active_record/support/inflector.rb.

* Added find_all_in_collection to has_many defined collections. Works 
like this:

     class Firm < ActiveRecord::Base
       has_many :clients
     end

     firm.id # => 1
     firm.find_all_in_clients "revenue > 1000" # SELECT * FROM clients 
WHERE firm_id = 1 AND revenue > 1000

   [Requested by Dave Thomas]

* Fixed finders for inheritance hierarchies deeper than one level 
[Florian Weber]

* Added add_on_boundry_breaking to errors to accompany add_on_empty as 
a default validation method. It's used like this:

     class Person < ActiveRecord::Base
       protected
         def validation
           errors.add_on_boundry_breaking "password", 3..20
         end
     end

   This will add an error to the tune of "is too short (min is 3 
characters)" or "is too long (max is 20 characters)" if the password is 
outside the boundry. The messages can be changed by passing a third and 
forth parameter as message strings.

* Implemented a clone method that works properly with AR. It returns a 
clone of the record that hasn't been assigned an id yet and is treated 
as a new record.

* Allow for domain sockets in PostgreSQL by not assuming localhost when 
no host is specified [Scott Barron]

* Fixed that bignums are saved properly instead of attempted to be 
YAMLized [Andreas Schwartz]

* Fixed a bug in the GEM where the rdoc options weren't being passed 
according to spec [Chad Fowler]

* Fixed a bug with the exclusively_dependent option for has_many

--
David Heinemeier Hansson,
http://www.rubyonrails.org/  -- Web-application framework for Ruby
http://www.instiki.org/      -- A No-Step-Three Wiki in Ruby
http://www.basecamphq.com/   -- Web-based Project Management
http://www.loudthinking.com/ -- Broadcasting Brain
http://www.nextangle.com/    -- Development & Consulting Services



0
david7095 (314)
9/5/2004 6:06:52 PM
comp.lang.ruby 48903 articles. 0 followers. Post Follow

0 Replies
445 Views

Similar Articles

[PageSpeed] 32
Reply:
Similar artilces about - [ANN] Rails 0.7.0, Action Pack 0.8.5, Active Record 0.9.5:

rndc stats on SLES 10 (BIND 9.3.2)
When I ran "rndc stats I used to get an error, now after changing directory permissions around it just goes to a shell prompt. See below: dss-dr93la05:/var/lib/named/slave # rndc stats dss-dr93la05:/var/lib/named/slave # This is from named.conf: statistics-file "/var/log/named.stats"; zone-statistics yes; notify no; # recursion no; ....As you can see the permissions are set to give everyone 777 to named.stats dss-dr93la05:/var/log # ll named.stats -rwxrwxrwx 1 root root 27020 2007-09-24 10:39 named.stats dss-dr93la05:/var/log # ...

Any Suggestion for which 8 port gigabit switch to use?
Hi all, I have gigabit port lan cards on all my servers would like to use one 8 port switch to access database server. I have been looking on internet and could not find a site which suggests most popular switches etc. I have following choice if any one of you using and are happy please let me know. 1. Dlink DGS-1008T 8-Port Gigabit Switch $250.00 2. Dlink DGS-1008TL 8-Port Gigabit Switch $330.00 3. EZ Switch 10/100/1000 - 8508T 8port 10/100/1000 Gigabit Switch $160.00 Thanks for help. ...

MQSeries 5.1 queue manager creation problems
Hi all, I have encountered a problem which is beyond my limited experience to resolve. My company has just picked up its first NSK machine in order to port some of its applications to NSK. In order to create the proper environment we have to have MQSeries 5.1. I have completed the installation without any errors or problems, but I am unable to create any queue managers. I have included the command and the response below. Any help would be greatly appreciated. Thanks, Kyle Barton $D0117 MQM 77> crtmqm -n $qmna -o $ZTNP1.#PTMDAAC -s $qmss -v $m01q qmdef MQSeries queue manager being cre...

PROMO * MVTS II v.1.3.1-50 to 1.4.0-50 - Professional Installation and Consulting for Setup
MERA VoIP Transit Softswitch II (MVTS II) is a next-generation prepaid switching platform with a geographically distributed architecture and highly flexible traffic handling capability. MVTS II is specifically designed to increase the efficiency of VoIP traffic management on large-scale networks and is targeted towards carriers running 3+ million minutes of VoIP calls per month. Built on modular architecture, the versatile MERA solution alleviates the challenges of managing traffic flows on highly distributed networks by providing intelligent built-in algorithms of call routing and ela...

Ann: PyGT 0.01 and PyMenu 0.01
Initial (Alpha) releases of two new modules: PyGT - Python Grid Toolkit A framework for developing, deploying, and managing grid systems using python modules. Curently very alpha, releasing to gauge public interest in project. GPL PyMenu - Python Menu Toolkit An easy-to-use API for making quick curses menus in python. Alpha, LGPL Both of these projects can be found at http://www.karllindekugel.com/ ...

Very slow record-retrieval through cursor
Hi, I use Berkeley-DB to manage more than 250 dbs and every db has the same structure (16 bytes key and 8 bytes data) and almost the same acount of records (about 500,000). These dbs are opened in the same environment with transaction enabled. When initialization, I have 4 threads to retrieve data from them through cursor simultaneously but no two thread will operate on the same db (thread 1 reads db 0, 4, ...; thread 2 reads db 1, 5, ...; etc.). After a while, the cursor read process becomes very slow, it need more than 20 seconds to finish the read from a db. My cache size is 4...

ANN: The aeb_mlink Package
Just uploaded a new pacakge to http://www.math.uakron.edu/~dpstory/aeb_pro.html called aeb_mlink. The aeb_mlink package implements new links capable of created multi- line links. The new commands are \mlhypertext, \mlhyperlink, \mlhyperref, \mlnameref, \mlNameref, and \mlhref. All but the first are multi-line versions of hyperref commands with the same root name. Restriction: This package requires Acrobat Distiller, version 7.0 or later to create multi-line links, and requires Adobe Reader 7.0 or later for the links to work correctly. aeb_mlink uses the soul package by Melchior FRANZ. Man...

How do you all feel Eudora 6.0 stacks up against Eudora 5.1 or 5.2 so far?
I still can't get it to check mail. I just read Katrinas excellent response just now so I will go back and look at my settings again. Outlook Express is working fine, and I used the same settings for Eudora that I used for Outlook, but Eudora won't check mail. So I will have to dig deeper. Peace. ...

CheckWeb 0.9 download and un-zipping of...
In the following URL: http://utter.chaos.org.uk/~pdh/software/checkweb.htm I downloaded !CheckWeb, but cannot find any de-crypting software that will de-crypt it. It downloaded as a URL filetype, but the extension was '/arc'. I have filetyped it to 'Archive' and to 'Zip'. Have tried ARCFS(read), SparkFS, Spark, InfoZip, but none of them like it. Any ideas anyone? If anyone can manage it, could they send it to me please. -- Cheers Roger The more information you have, the more likely it is to be wrong > > I downloaded !Che...

[ANN] guidata v1.2.1
Hi all, I am pleased to announce that `guidata` v1.2.1 has been released. This = library was initially written to help me to develop software for = internal use only, but after a long process I've just been able to share = this work with the Python community. Based on the Qt Python binding module PyQt4, guidata is a Python library = for easy data set edition (and display) thanks to automatically = generated graphical user interfaces - it also provides helpers and = application development tools for PyQt4. guidata also provides the following features: * guidata.qthelpe...

WTB: Delphi 7 Personal or Pro
Does anyone know where I can purchase an unregistered copy of Delphi 7 Personal or Professional? I've been checking eBay for months with no luck... Thanks "JC" <jconway94@yahoo.com> wrote in message news:t22Ee.157760$go.95025@fed1read05... > Does anyone know where I can purchase an unregistered copy of Delphi 7 Buy D8 professional and you get D7 with it. I found it here for about $400US. http://www.pcnation.com/web/details.asp?affid=303&item=C82932 > Personal or Professional? I've been checking eBay for months with no > luck... &...

New Tensorial 3.0 Tensor Calculus Package for Mathematica #2
Dear MathGroup, Renan Cabrera, Jean-Francois Gouyet and I have completed a new Version 3.0 of the Tensorial package. It is available for download at http://home.earthlink.net/~djmp/Mathematica.html The package should be useful both as an introduction to tensor calculations and for advanced calculations. Some of its features are: 1) There is complete freedom in the choice of symbols for tensor labels and indices. 2) Base indices may be any set of integers or symbols. Thus you could use {0,1,2,3} for relativity problems, or {t,x,y,z}, or {\[Rho],\[Theta],\[Phi]} for spherical...

Wildfire 2.0
Other thatn new splash screens and a non-compatability with Wildfire (1.0?) data files what does Wildfire 2.0 offer? It was nice knowing how many features/parts were being supressed or deleted in 2001. This doesn't seem to show in Wildfire or Wildfire 2.0. Is this shown elsewhere? "Robert" <selmra@comcast.com> wrote in message news:jqKdnbDmeLZkLimiRVn-hA@comcast.com... > Other thatn new splash screens and a non-compatability with Wildfire (1.0?) > data files what does Wildfire 2.0 offer? > > "Robert" <selmra@comcast.com> w...

[ANN] LTk V 0.91 released
Hello to all, I just uploaded the 0.91 version to the LTk webpage (http://www.peter-herth.de/ltk/). This release includes a set of patches and fixes which have accumulated over time. Most notably, it vastly improves number handling - so there will be no more errors when passing double floats to LTk functions. Unfortunately I have not had time to review all patches sent to me, so I rather wanted to release a stable version now and then have hopefully soon another release which adds everything left out in this release. Many thanks to everyone who contributed to this release! Peter -- Ltk, ...

ANN #7
I have used Artificial neural network with my Job to predict sth but there is some thing that I could not understand. why is the purpose of using validation and testing ? why are people neglect the validation or reduce it ? I "Munir Mahgub" wrote in message <l8v845$e6e$1@newscl01ah.mathworks.com>... > I have used Artificial neural network with my Job to predict sth but there is some thing that I could not understand. why is the purpose of using validation and testing ? why are people neglect the validation or reduce it ? > http://www.mathworks.com/matlabcentr...

[ANN] ImageroReader 1.30 released
Version 1.30 of ImageroReader is out now. New in this version: basic support for reading PSD files. optimized reading of metadata and images over http. ImageroReader is in Java written library for reading of image files. ImageroReader supports many popular image file formats: BMP, TIFF (uncompressed, JPEG, ZIP, LZW and PackBits compression; 1 to 64 bits;), PNG (also interlaced), JNG, MNG, CRW, JPEG and PSD image files. With ImageroReader it is easy to read thumbnails and metadata (e.g. IPTC, EXIF or XMP metadata) in TIFF, PNG, JNG, MNG, JPEG, EXIF, THM and PSD files. Imager...

press
Update of /cvsroot/press/pr/releases/8.0/br In directory pgfoundry.org:/tmp/cvs-serv92092/br Log Message: Directory /cvsroot/press/pr/releases/8.0/br added to the repository ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@postgresql.org so that your message can get through to the mailing list cleanly ...

2005-005 and 10.2.8
Today's announcement that Security Update 2005-005 is available for 10.3.9 leaves open the question of whether the addressed vulnerabilities existed in 10.2.8. I checked the CERT advisory and followed its links to the descriptions of the flaws that 2005-005 addresses. Apparently Mac OS X's Foundation Framework was shipped for the first time in 10.3.9. If so, its vulnerability is not a problem for a 10.2.8 user. My knowledge is inadequate to determine if 10.2.8 users are at risk for the other vulnerabilities fixed by 2005-005. Are we? -- Brent In article <170520051836556619%bs...

sendmail-8.12.10 compilation problems
Hi, I can't compile my sendmail-8.12.10 with the DNEWDB option. (Sun Solaris 8, Gcc 3.3.2, db 4.2.52) Could anybody help me, please? Regards, Ninou Ninou wrote: > I can't compile my sendmail-8.12.10 with the DNEWDB option. (Sun Solaris 8, > Gcc 3.3.2, db 4.2.52) > > Could anybody help me, please? What goes wrong ? What error are reported by sendmail Build script ? The link below may lead to some hints: http://www.sendmail.org/faq/section3.html#3.31 Q3.31 -- What does "class hash not available" mean? -- Andrzej [en:Andrew] Adam Filip http://anfi.webhop...

error control coding #9
@anyone thanks for reply, The LDPC code Macky Neal in mathworks is very much help full for understanding the Matlab coding and concept of ldpc,but if we run the code its ber performance is not good,can any one suggest why it is so and what i need to do to that code to improve ber. Thanks in advance. On Sat, 13 Apr 2013 14:54:09 +0000, thelapolu naveen bespake: > @anyone thanks for reply, > The LDPC code Macky Neal in mathworks is very much help full for > understanding the Matlab coding and concept of ldpc,but if we run the > code its ber performance is not...

USB Drive does not work on USB 2.0
I have an external 3.5" hard drive in a USB 2.0 enclosure that I have been attaching to USB 1.1 ports on several different computers for over a year without any problems. I have just recently installed a USB 2.0 PCI card in my computer for faster download speeds. However, when I plug my external drive into one of the USB 2.0 ports the device seems to install just fine, but when I go to access the drive, it shows up as a different drive letter than it always has before and when I go to access the drive I get the error message: The file or directory is corrupted and unreadable. ...

Re: input trouble #7 1551686
An infile statement with the truncover option appears to be the best solution. Can someone explain to me why there is apparently no flowover occurring when trying to read line 5, since the last field is the exact same length as the final field causing the problem in line 1? Thanks, Dan Daniel J. Nordlund Research and Data Analysis Washington State Department of Social and Health Services Olympia, WA 98504-5204 > -----Original Message----- > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of data > _null_; > Sent: Tuesday, February 14, 2006 1:29 PM > To: ...

[ANN] WhatRoute F1.8.16
The French.lproj folder, F1.8.16, for WhatRoute is now available at <ftp://ftp.sri.ucl.ac.be/pub/WhatRoute/>. And maybe soon on one of the mirrors : <ftp://ftp.calvacom.fr/pub/mac-fr/> <ftp://ftp.oleane.fr/pub/mirrors/version-francaise/> <ftp://ftp.free.fr/mirrors/ftp.sri.ucl.ac.be/> <ftp://ftp.ciril.fr/pub/Mac/UCL/> <ftp://ftp.cidif.org/mac/> <ftp://ftp.belnet.be/mirror/ftp.sri.ucl.ac.be/pub/> WhatRoute is an OpenTransport-based network analysis application that performs traceroute, ping, dnsquery, finger, whois, addre...

Avoiding duplicate PTR records when using $GENERATE
I've got range of 256 addresses, where I have valid PTRs for all addresses generated by: $GENERATE 0-255 $ PTR 123-123.123-66-$.acme.co.nz. My problem is that there are a dozen or so addresses scattered through this range where I want to define specific PTR records like this: 203 PTR ftp.acme.co.nz. 4 PTR www.acme.co.nz. 105 PTR smtp.acme.co.nz. However, this means that these addresses get two PTR records - generally A Bad Thing, especially for mailservers. Is there a way to use $GENERATE to just "fill the gaps"? ...

FAQ 5.16 How can I open a file with a leading ">" or trailing blanks?
This message is one of several periodic postings to comp.lang.perl.misc intended to make it easier for perl programmers to find answers to common questions. The core of this message represents an excerpt from the documentation provided with Perl. -------------------------------------------------------------------- 5.16: How can I open a file with a leading ">" or trailing blanks? Normally perl ignores trailing blanks in filenames, and interprets certain leading characters (or a trailing "|") to mean something special. The three argument form of open()...