improved pool interface

This commit is contained in:
albert
2011-03-04 18:50:38 -05:00
parent e431452a11
commit a281bf03ed
11 changed files with 105 additions and 18 deletions

View File

@@ -1,6 +1,6 @@
module PoolsHelper
def recent_pool_list
pool_ids = session[:recent_pool_ids].to_s.split(/,/)
pool_ids.map {|x| content_tag("option", x, :value => x)}.join("\n").html_safe
def recent_updated_pools(&block)
pool_ids = session[:recent_pool_ids].to_s.scan(/\d+/)
Pool.where(["id IN (?)", pool_ids]).each(&block) if pool_ids.any?
end
end