Skip to content

Instantly share code, notes, and snippets.

@0xjmp
Created February 19, 2014 20:10
Show Gist options
  • Select an option

  • Save 0xjmp/9100524 to your computer and use it in GitHub Desktop.

Select an option

Save 0xjmp/9100524 to your computer and use it in GitHub Desktop.
node(:collection_description) { |product|
if product.collection.present?
collections = YAML.load(view_context(file: Rails.root + "config/collections", formats: [:yml]))
collections[product.collection.name.dasherize]["description"]
end
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment