Class: BusinessesController
- Inherits:
-
ApplicationController
show all
- Defined in:
- app/controllers/businesses_controller.rb
Instance Method Summary
(collapse)
#authorize_customer!, #authorize_provider!
Instance Method Details
- (Object) edit
9
10
11
|
# File 'app/controllers/businesses_controller.rb', line 9
def edit
@business = current_user.business
end
|
- (Object) index
5
6
7
|
# File 'app/controllers/businesses_controller.rb', line 5
def index
@business_search_form = BusinessSearchForm.new business_search_params
end
|
- (Object) update
13
14
15
16
17
18
19
20
21
|
# File 'app/controllers/businesses_controller.rb', line 13
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
|