Navigation Menu

Skip to content

Commit

Permalink
removed unnecessary function
Browse files Browse the repository at this point in the history
  • Loading branch information
abloke committed Feb 1, 2007
1 parent c63b42e commit a29723b
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions lib/activity_log.rb
Expand Up @@ -50,19 +50,10 @@ def self.find_with(options={})
end

private
def self.decide_conditional(option)
if option.is_a?Array
"IN"
else
"="
end
end

def self.build_sql_conditional_for(options={})
conditions = []
options.each do |key, value|
conditional = decide_conditional(value)
conditions << self.send(:sanitize_sql, ["#{key.to_s}_id #{conditional} ?", value])
conditions << self.send(:sanitize_sql, ["#{key.to_s}_id IN (?)", value])
end
return conditions.join(" AND ")
end
Expand Down

0 comments on commit a29723b

Please sign in to comment.