[Nitro] Nitro + Og 0.25.0 Og scope, dynamic finders, evolution, helpers, bug fixes

George Moschovitis george.moschovitis at gmail.com
Thu Nov 17 05:52:28 EST 2005

Dear devs,

I am pleased to announce new versions of Nitro and Og

homepage: http://www.nitrohq.com
download: http://rubyforge.org/projects/nitro/
mailing list: http://rubyforge.org/mailman/listinfo/nitro-general
irc: irc.freenode.net #nitro

What new

This is the first in a series of releases focused on stability
and refinement. Many bugs where fixed, the high level api was
improved where needed, and we still got some small but incredibly
useful new features. Enjoy!

Most notable changes:

* Support for constrained / scoped queries in Og, here are
  some examples:

  User.with_scope(:condition => 'age > 2') {
    users = User.all

  Users.articles.find "title LIKE %t%" # => constrain i users articles.

* Dynamic auto generators, you can now query the database in

  User.find_by_name_and_age('gmosx', 'age')

* Added experimental version of a new schema evolution system. Assuming
  evolve_schema = true and evolve_schema_cautious = false

  * With this patch, on application startup, fields are added and deleted.
  * During run-time, if the file containing Og.setup is touched,
fields are added.
  * Fields are _not_ deleted during run-time, only at application startup.

  a the moment this works only in the PostgreSQL store, support for more
  stores is coming in the next versions. Thanks to Rob Pitt and Bryan Sotto
  for this feature.

* Template morphing now handles nested elements, an example:

  <div if="@user.admin?">
      <li each="role in @user.roles" />

* Added some useful helpers to make the code you write cleaner,
  here are some examples:

  class Article
    is Taggable

  instead of

  class Article
    include Og::Taggable


  class MainController
    helper :pager, :javascript, :sitemap

  instead of

  class MainController
    include Nitro::PagerHelper
    include Nitro::JavascriptHelper

  and stuff like that...

* New, improved, clean taggable implementation. This new implementation
  supports polymorphism.

  class Article
    is Taggable

  class Photo
    is Taggable


  t = Tag.find_by_name('new')

* Added useful StaticInclude as a separate compiler module to act
  as the first stage in the compilation pipeline.

* Integrated latest versions of Prototype, Scriptaculous, KirbyBase
  and facets.

* General code cleanup and refactoring.

* Many, many bug fixes, including security fixes.

What is Nitro?

Nitro provides everything you need to develop professional Web
applications using Ruby and Javascript.

Nitro redefines Rapid Application Development by providing a
clean, yet efficient API, a layer of domain specific languages
implemented on top of Ruby and the most powerful and elegant
object relational mapping solution available everywhere.

Nitro is Web 2.0 ready, featuring excellent support for AJAX,
XML, Syndication while staying standards compliant.

George Moschovitis


More information about the Nitro-general mailing list