Created
December 5, 2014 12:42
-
-
Save namxam/508e7b3d4b78b0d3b5a8 to your computer and use it in GitHub Desktop.
Parameter-Übergabe
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 ApplicationHelper | |
# Hier ist der default Wert von data ein leerer Hash | |
def mein_helper(input_1, data: {}) | |
haml_tag(:picture, data: data) | |
end | |
end |
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
.mein-div | |
= mein_helper 'test_image.jpg', data: { viewport_height: 100 } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment