Created
December 8, 2009 13:58
-
-
Save phillipoertel/251644 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# 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