mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Merge pull request #33 from differentreality/final_difficulty_levels
Add difficulty levels
This commit is contained in:
commit
4ed72d4967
15 changed files with 119 additions and 3 deletions
|
|
@ -71,6 +71,7 @@ class Admin::EventsController < ApplicationController
|
|||
@comments = @event.root_comments
|
||||
@comment_count = @event.comment_threads.count
|
||||
@ratings = @event.votes.includes(:person)
|
||||
@difficulty_levels = @conference.difficulty_levels
|
||||
end
|
||||
|
||||
def edit
|
||||
|
|
@ -102,6 +103,9 @@ class Admin::EventsController < ApplicationController
|
|||
if params.has_key? :event_type_id
|
||||
@event.update_attribute(:event_type_id, params[:event_type_id])
|
||||
end
|
||||
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])
|
||||
flash[:notice] = "Successfully updated #{@event.title}."
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue