Fix Hound CI violations

This commit is contained in:
Chrisbr 2014-05-10 10:24:58 +02:00
parent 0661b86b1c
commit 546977fc02
3 changed files with 26 additions and 19 deletions

View file

@ -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