mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-15 20:54:03 +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
|
|
@ -23,7 +23,7 @@ class Admin::ConferenceController < ApplicationController
|
|||
end
|
||||
|
||||
def update
|
||||
@conference = Conference.find_all_by_short_title(params[:id]).first
|
||||
@conference = Conference.find_by(short_title: params[:id])
|
||||
@conference.update_attributes(params[:conference])
|
||||
flash[:notice] = "Updated Conference"
|
||||
redirect_to(admin_conference_path(:id => @conference.short_title), :notice => 'Conference was successfully updated.')
|
||||
|
|
@ -31,7 +31,7 @@ class Admin::ConferenceController < ApplicationController
|
|||
|
||||
def show
|
||||
@conferences = Conference.all
|
||||
@conference = Conference.find_all_by_short_title(params[:id]).first
|
||||
@conference = Conference.find_by(short_title: params[:id])
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.json { render :json => @conference.to_json }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue