Class: Dune::Admin::BaseController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/dune/admin/base_controller.rb

Instance Method Summary collapse

Instance Method Details

#updateObject



14
15
16
17
18
19
20
21
22
23
# File 'app/controllers/dune/admin/base_controller.rb', line 14

def update
  update! do |format|
    if resource.errors.empty?
      format.json { respond_with_bip(resource) }
    else
      format.html { render action: 'edit' }
      format.json { respond_with_bip(resource) }
    end
  end
end