aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/chouette_controller.rb
blob: dd1002fd8e862a355e99e54a2718c2036dd6a04b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
class ChouetteController < BreadcrumbController

  include ApplicationHelper
  include BreadcrumbHelper

  before_action :switch_referential

  def switch_referential
    Apartment::Tenant.switch!(referential.slug)
  end

  def referential
    @referential ||= Referential.find params[:referential_id]
  end

  alias_method :current_referential, :referential
  helper_method :current_referential

end