afimb/chouette2

View on GitHub
app/controllers/organisations_controller.rb

Summary

Maintainability
A
0 mins
Test Coverage
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