diff options
Diffstat (limited to 'app/controllers')
| -rw-r--r-- | app/controllers/clean_ups_controller.rb | 2 | ||||
| -rw-r--r-- | app/controllers/concerns/referential_support.rb | 1 | 
2 files changed, 3 insertions, 0 deletions
| diff --git a/app/controllers/clean_ups_controller.rb b/app/controllers/clean_ups_controller.rb index c25df1a00..350f9ae87 100644 --- a/app/controllers/clean_ups_controller.rb +++ b/app/controllers/clean_ups_controller.rb @@ -3,6 +3,8 @@ class CleanUpsController < ChouetteController    respond_to :html, :only => [:create]    belongs_to :referential +  defaults :resource_class => CleanUp +    def create      @clean_up = CleanUp.new(clean_up_params)      @clean_up.referential = @referential diff --git a/app/controllers/concerns/referential_support.rb b/app/controllers/concerns/referential_support.rb index fe75e3579..f606e0e63 100644 --- a/app/controllers/concerns/referential_support.rb +++ b/app/controllers/concerns/referential_support.rb @@ -8,6 +8,7 @@ module ReferentialSupport    end    def switch_referential +    authorize referential, :browse?      Apartment::Tenant.switch!(referential.slug)    end | 
