Migrate AR finder/query methods in controllers

Signed-off-by: Alex Coles <alex@alexbcoles.com>
pull/6827/head
Alex Coles 9 years ago
parent b6aa9c0987
commit 993bbbe487
  1. 3
      app/controllers/meeting_contents_controller.rb

@ -112,7 +112,8 @@ class MeetingContentsController < ApplicationController
private private
def find_meeting def find_meeting
@meeting = Meeting.find(params[:meeting_id], include: [:project, :author, :participants, :agenda, :minutes]) @meeting = Meeting.includes(:project, :author, :participants, :agenda, :minutes)
.find(params[:meeting_id])
@project = @meeting.project @project = @meeting.project
@author = User.current @author = User.current
rescue ActiveRecord::RecordNotFound rescue ActiveRecord::RecordNotFound

Loading…
Cancel
Save