Skip to content

Commit

Permalink
Merge branch 'master' of github.com:appoxy/simple_record
Browse files Browse the repository at this point in the history
  • Loading branch information
Travis Reeder committed Feb 1, 2011
2 parents b46b303 + 8841371 commit 14ce224
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion lib/simple_record.rb
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion lib/simple_record/attributes.rb
Expand Up @@ -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
Expand Down

0 comments on commit 14ce224

Please sign in to comment.