Created
September 25, 2008 11:17
-
-
Save mrchrisadams/12803 to your computer and use it in GitHub Desktop.
This file contains 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
## This helper should return an image for each bank, depending on the value of current | |
def show_bank_logo(current) | |
case current | |
when /barclay/ | |
logo_image = 'barclays' | |
when /coop/ | |
logo_image = 'cooperative' | |
when /hsbc/ | |
logo_image = 'hsbc' | |
when /rbs/ | |
logo_image = 'rbs' | |
when /triodos/ | |
logo_image = 'triodos' | |
end | |
<img id=\"fact_bank_logo\" src=\"/images/money/#{logo_image}.gif\" />" | |
end | |
######################################################################### | |
#### I'm assuming this would be called like this in an rhtml file: | |
<%= show_bank_logo(current) %> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment