move swag fields to partial
This commit is contained in:
parent
93f7e07ebe
commit
e55509183c
5 changed files with 21 additions and 23 deletions
|
|
@ -61,14 +61,7 @@ module Admin
|
|||
swags_hash = @sponsor.swags_hash
|
||||
end
|
||||
|
||||
def generate_swags_hash(type, quantity)
|
||||
unless @sponsor.swag_hash
|
||||
@sponsor.swag_hash = {}
|
||||
end
|
||||
|
||||
@sponsor.swag_hash[type.to_s] = quantity.to_i
|
||||
@sponsor.update_attribute(:swag_hash, @sponsor.swag_hash)
|
||||
end
|
||||
|
||||
def get_swag_hash; end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue