public
Fork of chuyeow/activecouch
Description: ActiveCouch is a simple, convenient, Ruby-idiomatic wrapper for CouchDB
Homepage: http://github.com/arunthampi/activecouch
Clone URL: git://github.com/arunthampi/activecouch.git
Search Repo:
- Re-organize specs in more readable format
- define in ActiveCouch::Migration only accepts a block if block is given
arunthampi (author)
Sat Jan 19 06:30:09 -0800 2008
commit  24a1062678d5adfe81ee4c9b54ab98def4e462b9
tree    babf8963ca971d69acee8a784e6472aad5fe1f1f
parent  9d6b456584ec9ae46fffa1938e4229042c2df73c
...
60
61
62
63
64
65
66
...
205
206
207
208
209
 
210
211
212
...
60
61
62
 
63
64
65
...
204
205
206
 
 
207
208
209
210
0
@@ -60,7 +60,6 @@ module ActiveCouch
0
       attributes.each_value { |v| hash.merge!(v.to_hash) }
0
       associations.each_value { |v| hash.merge!(v.to_hash) }
0
       # and by the Power of Grayskull, convert the hash to json
0
-
0
       hash.to_json
0
     end
0
 
0
@@ -205,8 +204,7 @@ module ActiveCouch
0
         else
0
           new_record = self.new(arguments)
0
           new_record.save
0
-
0
- return new_record
0
+ new_record
0
         end
0
       end
0
 
...
22
23
24
25
 
26
27
28
...
22
23
24
 
25
26
27
28
0
@@ -22,7 +22,7 @@ module ActiveCouch
0
         # Don't care if the key doesn't exist
0
         @view, @database = get_view(view), options[:for_db]
0
         # Block being called to set other parameters for the Migration
0
- yield
0
+ yield if block_given?
0
       end
0
       
0
       def with_key(key = "")

Comments

    No one has commented yet.