couchrest/couchrest_model — Issue #135: Namespace support for Proxy database
Author: ipublic
Created: 2012-02-04 15:05:35+00:00
State: open

I would like to use proxy database methods to reference models in a namespace. For example:

class LinkedData::Authority < CouchRest::Model::Base
use_database SITES_DATABASE
unique_id :identifier

proxy_database_method :identifier
proxy_for :data_sources, :class_name => "LinkedData::DataSource"

property :identifier, String, :read_only => true
end

class LinkedData::DataSource < CouchRest::Model::Base
proxied_by :authority, :class_name => "LinkedData::Authority"

property :term, String
property :label, String
end

This code throws an active_model error: NoMethodError: undefined method `linked_data/authority=' for #