mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-16 21:24:05 +00:00
Replaced find_all_by through find_by
Find_by_all is removed in Rails 4.1
This commit is contained in:
parent
ee20ecce2f
commit
fbda757e70
8 changed files with 19 additions and 19 deletions
|
|
@ -1,11 +1,11 @@
|
|||
class Admin::VolunteersController < ApplicationController
|
||||
def index
|
||||
@conference = Conference.find_all_by_short_title(params[:conference_id]).first
|
||||
@conference = Conference.find_by(short_title: params[:conference_id])
|
||||
render :index
|
||||
end
|
||||
|
||||
def show
|
||||
@conference = Conference.find_all_by_short_title(params[:conference_id]).first
|
||||
@conference = Conference.find_by(short_title: params[:conference_id])
|
||||
if @conference.use_vpositions
|
||||
@volunteers = @conference.registrations.joins(:vchoices).uniq
|
||||
else
|
||||
|
|
@ -14,7 +14,7 @@ class Admin::VolunteersController < ApplicationController
|
|||
end
|
||||
|
||||
def update
|
||||
@conference = Conference.find_all_by_short_title(params[:conference_id]).first
|
||||
@conference = Conference.find_by(short_title: params[:conference_id])
|
||||
begin
|
||||
@conference.update_attributes!(params[:conference])
|
||||
redirect_to(admin_conference_volunteers_info_path(:conference_id => params[:conference_id]), :notice => "Volunteering options were successfully updated.")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue