| |
Ruby on Rails: Talk |
Just like SimplyRestful, though the conventional way of doing things
continues to be supported, if you jump on board with certain conventions
you'll get some convenience for free. While SimplyRestful took on the
controller side of things, this begins to address the view side of the
puzzle.
For example:
@person # => <Person id: 1>
render :partial => @person
is the same as
render :partial => 'people/person', :object => @person
and
render :partial => @people
is the same as
render :partial => 'people/person', :collection => @person
and
page[@person]
is the same as
page[dom_id(@person)]
which is
page[:person_1]
and etc.
marcel
--
Marcel Molina Jr. <mar...@vernix.org>