app/controllers/organisations_controller.rb
class OrganisationsController < BreadcrumbController
before_action :check_authorize, except: [:show, :index]
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