Created
July 9, 2016 12:19
-
-
Save anonymous/f2f7831fe40e4ec72ac6a584baf91341 to your computer and use it in GitHub Desktop.
hash_creation.rb
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
# {:media_id=>[470030289822314497], :alt_text=>{:text=>["foo"]}} | |
def add_alt_text_to_media(media_id, alt_text, options = {}) | |
hash = options.dup | |
hash[:media_id] = media_id | |
hash[:alt_text] = {} | |
hash[:alt_text][:text] = alt_text | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment