Skip to content

Instantly share code, notes, and snippets.

@gamafranco
Created July 8, 2011 10:03
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save gamafranco/1071498 to your computer and use it in GitHub Desktop.
def fill_box(asset, selected, selected_class)
items = asset.map { |item| item.id } if asset.is_a?(Array)
items ||= [asset.id]
output = items.map ...
output.html_safe
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment