blob: bc74f72fc3cf829c450aa695e2fb4fba914d90d7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
  | 
class ChouetteController < InheritedResources::Base
  
  before_filter :switch_referential
  def switch_referential
    Apartment::Database.switch(referential.slug)
  end 
  def referential
    @referential ||= current_organisation.referentials.find params[:referential_id]  
  end 
end
  |