Skip to content

Instantly share code, notes, and snippets.

@aiaio
Created June 13, 2009 22:53
Show Gist options
  • Save aiaio/129462 to your computer and use it in GitHub Desktop.
Save aiaio/129462 to your computer and use it in GitHub Desktop.
# Create product images.
@product.product_images.create(:label => 'main', :image => # Attachment object)
@product.product_images.create(:label => 'header', :image => # Attachment object)
# Access product images.
@product.available_images('main')
@product.available_images('header')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment