conference-opportunities/conference-opportunities

View on GitHub
app/controllers/conferences_controller.rb

Summary

Maintainability
A
0 mins
Test Coverage
class ConferencesController < ApplicationController
  def index
    @conferences = policy_scope(Conference).map { |c| ConferencePresenter.new(c) }
  end

  def show
    authorize current_conference
    @conference = ConferencePresenter.new(current_conference)
  end

  private

  def current_conference
    Conference.includes(:event).find_by_twitter_handle!(params[:id])
  end
end