blob: d80541800e167e5a4505c54572ea62f1f56e1fa7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  | 
class OrganisationsController < InheritedResources::Base
  defaults :resource_class => Organisation
  respond_to :html, :only => [:edit, :show, :update]
  def update
    update! do |success, failure|
      success.html { redirect_to organisation_path }
    end
  end
  private
  def resource
    @organisation = current_organisation
  end
  def organisation_params
    params.require(:organisation).permit(:name)
  end
end
  |