houdini/app/controllers/concerns/controllers/supporter/current.rb
2021-02-24 16:18:43 -06:00

15 lines
426 B
Ruby

# frozen_string_literal: true
# License: AGPL-3.0-or-later WITH WTO-AP-3.0-or-later
# Full license explanation at https://github.com/houdiniproject/houdini/blob/master/LICENSE
module Controllers::Supporter::Current
include Controllers::Nonprofit::Current
extend ActiveSupport::Concern
included do
private
def current_supporter
current_nonprofit.supporters.find(params[:supporter_id] || params[:id])
end
end
end