Class: BusinessesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/businesses_controller.rb

Instance Method Summary (collapse)

Methods inherited from ApplicationController

#authorize_provider!

Instance Method Details

- (Object) edit



5
6
7
# File 'app/controllers/businesses_controller.rb', line 5

def edit
  @business = current_user.business
end

- (Object) update



9
10
11
12
13
14
15
16
17
# File 'app/controllers/businesses_controller.rb', line 9

def update
  @business = current_user.business

  if @business.update(business_params)
    redirect_to root_path, notice: 'Business updated successfully!'
  else
    render 'edit', status: 403
  end
end