Suppose you have the same image tag included frequently in a Rails application. One way to clean up the code a bit and to set defaults is to create a super simple view helper method that can receive a hash parameter and merge it with the defaults.
1 2 3 4
Then in the usual place of the HTML.ERB template, one can now do this:
1 2 3