clean up profile generation (wip)

This commit is contained in:
2023-01-20 14:59:34 +02:00
parent 82358d8642
commit caba7630cf
9 changed files with 78 additions and 58 deletions

View File

@ -13,7 +13,7 @@ class EventsController < ApplicationController
# GET /events/new
def new
kind = params[:profile]
kind = Profile.types.first unless Profile.types.include?(kind)
kind = Profile.kinds.first unless Profile.kinds.include?(kind)
profile = current_member.profile(kind)
if(profile)
@event = Event.new profile: profile

View File

@ -13,7 +13,7 @@ class ProfilesController < ApplicationController
# GET /profiles/new
def new
kind = params[:kind]
kind = Profile.types.first unless Profile.types.include?(kind)
kind = Profile.kinds.first unless Profile.kinds.include?(kind)
@profile = Profile.new kind: kind
end