move swag fields to partial

This commit is contained in:
nasia 2017-08-25 20:04:19 +03:00
parent 93f7e07ebe
commit e55509183c
5 changed files with 21 additions and 23 deletions

View file

@ -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