blob: 6ef699d5b8e8408258d41cc46137d78355cd280b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
class ChouetteController < InheritedResources::Base
include ApplicationHelper
before_filter :switch_referential
layout "without_sidebar", :only => [:edit, :new, :update, :create]
def switch_referential
Apartment::Database.switch(referential.slug)
end
def referential
@referential ||= current_organisation.referentials.find params[:referential_id]
end
end
|