mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-16 21:24:05 +00:00
Mention organization name while creating a conference
This commit is contained in:
parent
c596a9fda7
commit
1a5aa14e2c
3 changed files with 7 additions and 3 deletions
|
|
@ -72,11 +72,12 @@ module Admin
|
|||
|
||||
def new
|
||||
@conference = Conference.new
|
||||
@organizations = Organization.accessible_by(current_ability, :update).pluck(:name, :id)
|
||||
end
|
||||
|
||||
def create
|
||||
@conference = Conference.new(conference_params)
|
||||
@conference.organization = Organization.find_or_create_by(name: 'organization')
|
||||
|
||||
if @conference.save
|
||||
# user that creates the conference becomes organizer of that conference
|
||||
current_user.add_role :organizer, @conference
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue