add bootstrap-switch for is_highlight
This commit is contained in:
parent
2dd326c8b9
commit
a845dd5d7d
9 changed files with 45 additions and 12 deletions
|
|
@ -106,9 +106,14 @@ module Admin
|
|||
|
||||
def update
|
||||
if @event.submitter.update_attributes(params[:user]) &&
|
||||
@event.update_attributes(params[:event])
|
||||
@event.update_attributes(params[:event])
|
||||
|
||||
if request.xhr?
|
||||
render js: 'index'
|
||||
else
|
||||
flash[:notice] = "Successfully updated event with ID #{@event.id}."
|
||||
redirect_back_or_to(admin_conference_event_path(@conference.short_title, @event))
|
||||
end
|
||||
else
|
||||
@url = admin_conference_event_path(@conference.short_title, @event)
|
||||
flash[:notice] = 'Update not successful. ' + @event.errors.full_messages.to_sentence
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue