Class: Admin::ShopsController

Inherits:
AdminController
  • Object
show all
Defined in:
app/controllers/admin/shops_controller.rb

Instance Method Summary collapse

Instance Method Details

#editObject



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

def edit
  respond_with(:admin, current_shop)
end

#updateObject



9
10
11
12
13
14
15
# File 'app/controllers/admin/shops_controller.rb', line 9

def update
  if current_shop.update_attributes(post_params[:shop])
    redirect_to edit_admin_shop_path, notice: 'Shop was successfully updated'
  else
    respond_with(:admin, current_shop)
  end
end