mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Fix Hound CI violations
This commit is contained in:
parent
0661b86b1c
commit
546977fc02
3 changed files with 26 additions and 19 deletions
|
|
@ -16,9 +16,10 @@ class Admin::ConferenceController < ApplicationController
|
|||
def create
|
||||
@conference = Conference.new(params[:conference])
|
||||
if @conference.save
|
||||
redirect_to(admin_conference_path(:id => @conference.short_title), :notice => 'Conference was successfully created.')
|
||||
redirect_to(admin_conference_path(id: @conference.short_title),
|
||||
notice: 'Conference was successfully created.')
|
||||
else
|
||||
render :action => "new"
|
||||
render action: 'new'
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -26,9 +27,11 @@ class Admin::ConferenceController < ApplicationController
|
|||
@conference = Conference.find_by(short_title: params[:id])
|
||||
short_title = @conference.short_title
|
||||
if @conference.update_attributes(params[:conference])
|
||||
redirect_to(admin_conference_path(id: @conference.short_title), notice: 'Conference was successfully updated.')
|
||||
redirect_to(admin_conference_path(id: @conference.short_title),
|
||||
notice: 'Conference was successfully updated.')
|
||||
else
|
||||
redirect_to(admin_conference_path(id: short_title), notice: 'Conference update failed.')
|
||||
redirect_to(admin_conference_path(id: short_title),
|
||||
notice: 'Conference update failed.')
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -37,7 +40,7 @@ class Admin::ConferenceController < ApplicationController
|
|||
@conference = Conference.find_by(short_title: params[:id])
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.json { render :json => @conference.to_json }
|
||||
format.json { render json: @conference.to_json }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue