mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
save person attributes first
This commit is contained in:
parent
bacae17b87
commit
735d1ef7d2
1 changed files with 4 additions and 2 deletions
|
|
@ -106,13 +106,15 @@ class Admin::EventsController < ApplicationController
|
|||
if params.has_key? :difficulty_level_id
|
||||
@event.update_attribute(:difficulty_level_id, params[:difficulty_level_id])
|
||||
end
|
||||
if @event.update_attributes(params[:event]) && @event.submitter.update_attributes(params[:person])
|
||||
|
||||
if @event.submitter.update_attributes!(params[:person]) && @event.update_attributes!(params[:event])
|
||||
flash[:notice] = "Successfully updated #{@event.title}."
|
||||
else
|
||||
flash[:notice] = "Update not successful."
|
||||
end
|
||||
|
||||
expire_page :controller => '/schedule', :action => :index
|
||||
redirect_back_or_to(admin_conference_event_path(@conference.short_title, @event), :notice => "Updated")
|
||||
redirect_back_or_to(admin_conference_event_path(@conference.short_title, @event))
|
||||
end
|
||||
|
||||
def create
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue