Allow badges to be marked as "titleable".

This commit is contained in:
Vikhyat Korrapati
2014-04-25 23:55:29 +05:30
parent 535965263a
commit b4e037dfb2
15 changed files with 51 additions and 26 deletions

View File

@ -30,10 +30,11 @@ class Admin::BadgesController < Admin::AdminController
end
def update_badge_from_params(badge)
params.permit(:name, :description, :badge_type_id)
params.permit(:name, :description, :badge_type_id, :allow_title)
badge.name = params[:name]
badge.description = params[:description]
badge.badge_type = BadgeType.find(params[:badge_type_id])
badge.allow_title = params[:allow_title]
badge
end
end