Created
November 2, 2008 04:58
-
-
Save alcabanillas-engh/21652 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##Model | |
class NpaNxx | |
include DataMapper::Resource | |
property :id, String, :key => true, :field => :_id, :serial => true | |
property :rev, String, :field => :_rev | |
property :npanxx, String, :view => true | |
property :region, String | |
property :ocn, String | |
property :ratecenter, String | |
property :exchange, String | |
property :company_name, String | |
#view :by_npanxx, { "map" => "function(doc) { if (doc.type == 'npa_nxx') { emit(doc.npanxx, doc); } }" } | |
end | |
##Code to find | |
npanxx = NpaNxx.get(:npanxx => "907209") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment