Skip to content

Instantly share code, notes, and snippets.

View Chris-Galten's full-sized avatar

Chris Galten Chris-Galten

View GitHub Profile
@Chris-Galten
Chris-Galten / gist:1528941
Created December 28, 2011 18:09
Making categories
step 'the following category records' do |table|
table.hashes.each do |hash|
a = AttributeSet.find_or_create_by(slug: 'myattritubetest', label: 'myattributetest', description: 'myattributeset')
if hash['parent'].empty?
Category.find_or_create_by(title: hash['category'], attribute_set_id: a.id)
else
path = []
# TODO: Rewrite this block
hash['parents'].split(', ').each do |path_element|
tmp = Category.find_or_create_by(title: path_element.strip, attribute_set_id: a.id)
@Chris-Galten
Chris-Galten / Boxfile
Created November 11, 2011 15:49
Boxfile
web1:
name: txfunds
document_root: /www
php_extensions:
- mysqli
- curl
shared_writable_dirs: [/tmp]
php_display_errors: 0
db1:
web1:
shared_writable_dirs:
- /search_index