Created
July 27, 2010 06:10
-
-
Save scottswezey/491826 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ResultsHelper | |
def make_table_row_for(result, rate) | |
ret << [] | |
ret << content_tag(:tr) do | |
content_tag(:th, rate.to_s.humanize) | |
content_tag(:td) do | |
pretty_number_to_currency method(rate, [:mean, :mathematical_mode, :lowest, :highest]) | |
end | |
end | |
return ret.join("\n") | |
end | |
def method(rate, methods) | |
methods.each do |method| | |
@result.send(rate).send(method) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment