Posted By: George Moschovitis
Date: 2006-03-09 06:30
Summary: Nitro + Og 0.29.0 Errors, templates, R operator, more
Project: Nitro

A bold step towards maturity. Great care was taken to
fix reported bugs and fine tune many aspects of Nitro and Og.
As always some great new features where added. Special thanks fly
to Jonas Pfenniger, Bryan Sotto, Rob Pitt and Guillaume
Pierronnet for making this release possible.

Most notable changes:

* Greatly improved error detection and report. Nitro now provides
line exact error reports at compile or run time, in actions
or templates. Stay tuned for more improvements in error

* Nitro now supports a very useful url endoding/decoding system
along with a Camping inspired R operator. This new system allows
you to refer to controllers and actions in your code, without
bothering about the enforced nice urls and rewrite/routing
rules. This allows you to write more robust code.

Here are some examples:

redirect R(UsersController, :login, :name, 'gmosx')
<a href="#{R(ForaController, :delete, :id, 3)}">delete</a>

some more helpers and better integration of this feature
will be available soon.

* To better support the URL codec, a new router was implemented.
The new version is both more powerfull and faster. Here are
some examples:

r.add_route(%r{rewritten/url/(.*)}, :controller => IdController, :action => :register, :param => :name)
r.add_route(%r{another/zelo/(.*)/(.*)}, :controller => AdminController, :action => :kick, :params => [:name, :age])
r.add_route(%r{cool/(.*)_(.*).html}, :controller => AdminController, :action => :long, :params => [:name, :age])

* Og now supports calculations and aggregations. Here are some

User.min(:age, :group => :profession) # => [..] (aggregation)
User.sum(:age, :group => :role) # => [..]

and more!

* Improved template_root handling. Now Nitro automatically generates
a template_root stack for each controller / publishable object.
Of course the developer can fully customize this stack.
This is great for reusable modules of functionality (parts). Lets
say you have implemented a forum part. When you 'mount' the
forum controller a path relative to the mount point is pushed
in the template_root stack. When the dispatcher searches for
a template, it traverses the stack. In the described scenario
it first looks in the application template root, next in a template
root the points inside the part template root and then in the
proto dir template root. The proto dir template root is automatically
pushed as the last root in the stack. This system facilitates
'object oriented sites'.

Use the following method to customize the template_root.

def self.setup_template_root(path)

* Added support for JSP like application scoped (global)

def login
global[:users] << current_user
application[:users] << current_user

The global/application hash is backed by any of the available
cache stores.

* Improved Taggable mixin, now provides more helpers and supports
tag garbage collection through reference counting.

* Added a new store for the generalized caching system that is
backed by a MemCache server. Useful to extract the last ounch
of performance in a production environment.

* Fixes in the SCGI adapter.

* Many Og bug fixes and optimizations.

* More flexible static include compiler.

* Improved testing support.

* Integrated latest versions of Scriptaculous and Facets.

* Many, many bug fixes and small improvements throughout the

Latest News
TZInfo::Data v1.2014.2 Released
    Philip Ross - 2014-03-25 22:32
TZInfo v0.3.39 Released
    Philip Ross - 2014-03-09 20:23
TZInfo::Data v1.2014.1 Released
    Philip Ross - 2014-03-09 20:00
Automatic Ruby 14.2.0 has been released!
    id 774 - 2014-02-26 06:23
kramdown 1.3.2 released
    Thomas Leitner - 2014-02-16 08:35


Forums | Admin

Discussion Forums: nitro---og-0.29.0-errors--templates--r-operator--more

Start New Thread Start New Thread


Topic Topic Starter Replies Last Post