Permalink
Browse files

Merge branch 'master' of github.com:appoxy/simple_record

  • Loading branch information...
2 parents b46b303 + 8841371 commit 14ce2246022b39d7850d0621597b48b179be245f @treeder treeder committed Feb 1, 2011
Showing with 8 additions and 2 deletions.
  1. +7 −1 lib/simple_record.rb
  2. +1 −1 lib/simple_record/attributes.rb
@@ -861,6 +861,11 @@ def self.find(*params)
if params.size > 1
options = params[1]
end
+ conditions = options[:conditions]
+ if conditions && conditions.is_a?(String)
+ conditions = [conditions]
+ options[:conditions] = conditions
+ end
if !options[:shard_find] && is_sharded?
# then break off and get results across all shards
@@ -958,7 +963,8 @@ def self.paginate(options={})
def self.convert_condition_params(options)
return if options.nil?
conditions = options[:conditions]
- if !conditions.nil? && conditions.size > 1
+ return if conditions.nil?
+ if conditions.size > 1
# all after first are values
conditions.collect! { |x|
Translations.pad_and_offset(x)
@@ -346,7 +346,7 @@ def get_attribute(name)
begin
single_clob = s3_bucket(false, :s3_bucket=>:new).get(single_clob_id)
single_clob = JSON.parse(single_clob)
- puts "single_clob=" + single_clob.inspect
+# puts "single_clob=" + single_clob.inspect
single_clob.each_pair do |name2,val|
@lobs[name2.to_sym] = val
end

0 comments on commit 14ce224

Please sign in to comment.