Skip to content

Instantly share code, notes, and snippets.

@phillipoertel
Created December 8, 2009 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phillipoertel/251644 to your computer and use it in GitHub Desktop.
Save phillipoertel/251644 to your computer and use it in GitHub Desktop.
#
# CONTROLLER
#
# POST /admin/voucher_set
class Admin::VoucherSetController < ...
def create
VoucherSet.create!(params)
end
end
#
# MODEL
#
class VoucherSet < AR::Base
has_many :vouchers
belongs_to :organization
def before_create
# call your voucherset DSL here
end
private
# put your voucherset DSL here
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment