FYI, I recently pushed my fork with ActiveModel::Callbacks and
ActiveModel::Validations. Outdated bundled callbacks code and
validations completely removed. Edge AMo and AS required (won't work
with beta3 for some reason). Branch:
http://github.com/wildchild/couchrest/commits/active_model
Special couchrest-active_model gem with ActiveModel::Lint
compatibility layer is on the line.
I should lobby for a patch to rails to make it smooth. The fields_for
helper is problematic because it forces hidden field with "id". The
idea is to get rid implicitly created hidden field with id if object
does not respond_to?(:to_key). Nested casted models should not have id
unless it explicitly required by domain model. Currently id is there
because of support/rails.rb, but should be deleted, IMHO.
Also I have couchrest-nested_attributes gem that allows nested model
assignment like activerecord does. I must write some specs before
pushing it.
Early access to AMo compat. and nested attributes with code example:
https://gist.github.com/7e662b969440828225a3#file_example.rb
Cheers.
On Apr 16, 7:46 am, Marcos Tapajos <
tapa...@gmail.com> wrote:
> Hi folks,
>
> I'm studying the changes on the Rails 3, especially in the Active Model. I was checking if it is useful for the CouchRest and I think that it is.